Nx: Runnung nx affected:libs on pipeline returns with ERROR : "fatal: Not a valid object name master"

Created on 18 May 2019  路  4Comments  路  Source: nrwl/nx

Runnung nx affected:libs on Azure DevOps.
Everything is working locally on mac and windows

Expected Behavior

nx affected:libs --base=master should return affected libs

Current Behavior

Failing :(

Context

Please provide any relevant information about your setup:

  • version of Nx used - 7.4.0
  • version of Angular CLI used - ^7.2.2

Failure Logs

> nx affected:libs --base=master
fatal: Not a valid object name master
Command failed: git merge-base master HEAD
fatal: Not a valid object name master

Most helpful comment

@ernie58, instead of doing --base=master => --base=remotes/origin/master

All 4 comments

@beynya did you manage to find a solution, having this problem as well lately

@ernie58, instead of doing --base=master => --base=remotes/origin/master

thx @beynya worked!

With latest update it does not work anymore. But there is a right way to put command-line arguments if you have a main branch name different from master and want to use '--all' argument:
nx affected:build --all -- trunk HEAD
Notice the space after '--' before the branch name (trunk in my case) That will do the trick.

Was this page helpful?
0 / 5 - 0 ratings