Skip to content
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

webapp: Quit using the pipe character '|' inside runtime types - makes CLI difficult #13866

Closed
freemansoft opened this issue Jun 8, 2020 · 10 comments
Labels
Service Attention This issue is responsible by Azure service team. Web Apps az webapp

Comments

@freemansoft
Copy link

freemansoft commented Jun 8, 2020

Describe the bug
Can't find any way to run the --runtimes on windows in bash shell.
Quit using the "|" character in values for --runtime for the CLI. It causes problems in all shells.
Use "-" or "_" or some non special character.

To Reproduce
Install Azure CLI on windows
Install any bash shell like Git Bash
Alias az=az.cmd
Try and run something like "az webapp create .... -runtime "JAVA|8-jre8"
Try and run something like "az webapp create .... -runtime "JAVA|8-jre8"

Expected behavior
Standard Bash escaping should work but it doesn't

Environment summary
Install Azure CLI on windows 10 using the installer

Additional context
Our build servers run on linux. Most of our developers have Windows laptops. We run Git BAsh shells in Visual Code and in shell windows

Pretty much everything in the CLI works fine except for these dang runtime names with embedded pipe characters.

Runtimes should be specified with ARNs. Something like

  • runtime:linux/JAVA/8-jre8
@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 8, 2020
@triage-new-issues triage-new-issues bot added triage and removed triage labels Jun 8, 2020
@ghost ghost added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jun 8, 2020
@yonzhan yonzhan added Web Apps az webapp Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 8, 2020
@ghost
Copy link

ghost commented Jun 8, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 8, 2020

webapp

@freemansoft
Copy link
Author

The second example that fails actually has a backslash prior to the pipe. You can only see it if you edit the post. The backslash is eaten by the formatter.

@panchagnula panchagnula changed the title Quit using the pipe character '|' inside runtime types - makes CLI difficult webapp: Quit using the pipe character '|' inside runtime types - makes CLI difficult Jun 16, 2020
@panchagnula
Copy link
Contributor

Thanks for reporting - the use of pipe | comes from the API that sets the values as language|runtime-version. Please make sure to use bash or terminal instead of Powershell - to ensure pipe doesn't mess with the usage. Closing this as by design for now.

@freemansoft
Copy link
Author

The "|" is a bad character to put in the API. Are you saying this change would have to happen in a different project?

@panchagnula
Copy link
Contributor

@freemansoft yes our API team is working on re-writing the API & this is the feedback I already shared with them. If API doesn't make that change - we plan to obscure this info from CLI command & handle it on the client before passing it to the API, but that will take time unfortunately.

@piouson
Copy link

piouson commented Oct 12, 2020

Just stumbled on this issue with Git Bash and wondering if anyone found a way to escape '|' or a cli alternative..
Asked on Stackoverflow

@freemansoft
Copy link
Author

Moving to Linux on Windows with WSL2 has become my go-to fix for this type of thing.

@piouson
Copy link

piouson commented Oct 12, 2020

@freemansoft lucky man, some of us hands tied.. #6016 #4285 #5336

Git Bash - fail
PowerShell - fail
Command Prompt - works 😖

@panchagnula
Copy link
Contributor

@freemansoft lucky man, some of us hands tied.. #6016 #4285 #5336

Git Bash - fail
PowerShell - fail
Command Prompt - works 😖

Sorry folks - we plan to make this change on the client side since the API continues to use this format in the versioning. In the meantime please check out this link to see if it helps https://docs.microsoft.com/en-us/cli/azure/use-cli-effectively?view=azure-cli-latest#quoting-issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention This issue is responsible by Azure service team. Web Apps az webapp
Projects
None yet
Development

No branches or pull requests

4 participants