Closed jsuddsjr closed 2 years ago
After further investigation, this bug is caused by the idiosyncrasies of PowerShell. When setting variables in the command line, these values are passed as separate arguments.
--route-parameters project=$($projectId) wikiIdentifier=$($wikiId)
To work around this, you must quote the value as strings.
--route-parameters "project=$projectId" "wikiIdentifier=$wikiId"
Describe the bug
Cannot pass values to the route with
--route-parameters
.Command Name
az devops invoke Extension Name: azure-devops. Version: 0.25.0.
Debugging INFO: cli.azext_devops.dev.team.invoke: inputList is ['project=', 'MAX', 'wikiIdentifier=', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx']
Note that the arguments from
--route-parameters
are not sent as 'key=value' pairs. Rather, they are sent as separate arguments forkey=
,value
. The current code tries to split these elements into two values at the '=' but fails when the second item in the list isn't in the expected format.Here's the code from the latest version of
azext_devops\dev\team\invoke.py
.Expected Behavior
This code has been updated to handle the input format.
Environment Summary
Additional Context