-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I find an issue in this page. #1210
Comments
Hi @AlexChongMicrosoft , I am not sure what is the issue that you are facing. Double quotes (") would be required if user is running commands in Powershell. |
@ishitam8 Thank you for your attention. Actually, I worked with a customer for a long time on this issue. When using double quotes "", the string "$PROJECT:vstfs:///Classification/TeamProject/e479xxxx-2be8-xxxx-bb0b-3a0209cxxxx" would not be detected correctly. But when using single quotes, '$PROJECT:vstfs:///Classification/TeamProject/e479xxxx-2be8-xxxx-bb0b-3a0209cxxxx', it will be considered as a single string. Here I paste my screenshot in powershell. Hope it could help. for you. |
Sorry for the typo. I meant, Single quotes (') would be required if user is running commands in Powershell. So, this is specific to powershell, since the command contains a dollar sign and we want to pass the dollar sign as a string, the required string needs to be wrapped around in single quotes. Usually dollar signs are associated with variables and Powershell would try to resolve these, but if you use single quotes (') instead of double quotes ("), It prevents PowerShell expanding $ into a variable. What i was trying to convey here is that this behavior is not speciifc to Azure DevOps CLI, these are common escape characters associated with the different command prompts. |
@ishitam8 really appreciate your explanation. It makes sense. Actually, with you explanation, I can understand its meaning. But for some of our users, when they follow this doc and use double quotes " in Linux, there is no notification of $ variable. It's what exactly makes them confused. And after a lot of testing, we found it should be a single quote here in both Linux bash and windows powershell. I just raise my suggestion here and let you know the scenario. Double quotes " and single quote ' are the same in most of the scenarios, but here in my experience single quote ' is better because there will be less confusion when exactly following this doc. Or could you add a detailed explanation in this doc if possible? It depends on you. Thank you very much for this good doc. |
Thanks @AlexChongMicrosoft , for the detailed explanation of why it would be common for linux users to get confused here. @geverghe , Do we need to change the doc to include single quotes.? |
@ishitam8 Thank you for your attention. Really hope I can do something for our Microsoft. |
@AlexChongMicrosoft, @ishitam8 - I believe this is an issue across azure cli and there is a page in azure cli docs that tackles this precise problem -Quoting Issues . I am dropping the devops extension tag. Call out to the Azure CLI team to include this page as part of official doc. |
The double quotes for passing the token have also blocked me for quite some time. Due to the fact that the command returns a successful result, I didn't think about this possibility of a quoting issue. It would be nice if the documentation clearly mentions the quoting issue for the token argument and maybe even better: the command should return a failure when passing an invalid token argument with double quotes. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07. |
This PR Azure/azure-devops-cli-extension#1333 will fix the issue |
With a lot of testing in both Windows/Linux, I find an issue in the update command.
It's necessary using ' replace " to envelop the token. Please have a check.
az devops security permission update --allow-bit 7 --namespace-id 52d39943-cb85-4d7f-8fa8-c6baac873819 --subject [email protected] --token '$PROJECT:vstfs:///Classification/TeamProject/e479xxxx-2be8-xxxx-bb0b-3a0209cxxxx'
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: