Reputation: 35812
I am using Azure CLI azure-devops extension to manage my projects and git repositories in dev.azure.com.
az extension add --name azure-devops
To make code more readable and configurable I would like to use: (it does not matter if the values are between quotation marks or not)
az devops configure --defaults organization=https://dev.azure.com/myname
az devops configure --defaults project=f514a982-...
Those commands executed without error (powershell) but it seems they has no effect on the following commands.
For example
az repos list # lists an other project's repos, not the required f514a982
However executing
az repos list --project f514a982....
gives the expected result.
Missing I something or is this a bug?
Upvotes: 4
Views: 3961
Reputation: 35812
Actually I figured it out, hopefully spares time someone in the future:
There is a --detect
parameter which is on
by default and if it is on
then overrules the --defaults
settings.
So if you run anywhere the command under a git repo folder tree and you do not explicitly use the --detect off
, it will use that devops project (as default) which that git repo belongs to regardless of the previously executed az devops configure --defaults
command
Upvotes: 4