Sometimes I have a problem with running various commands (I'm using Git Bash, if that matters). For example, when I try to execute:
az container exec --resource-group My-RG --name influxdb-container --exec-command "/bin/bash"
The command above should normally "SSH" me into the Azure Container Instance. However, instead, I'm getting:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
I found a lot of posts on SO with such error, however, the issue in those posts was about invoking commands without proper quoting of "C:\Program Files". In my case, however, there is no "Program Files" anywhere, so I have a hard time figuring out what is wrong.
az
command is recognized by the shell, when I invoke it alone, I'm getting proper response from Azure CLI.
I am also getting a similar error when running docker commands sometimes. Unfortunately, right now I do not know which command exactly would cause that.
This issue happens only on my Windows machine. When I run the command from Linux or macOS, it just works.
And the proof that az
works: