{"action":"created","issue":{"url":"https://api.github.com/repos/cmderdev/cmder/issues/1846","repository_url":"https://api.github.com/repos/cmderdev/cmder","labels_url":"https://api.github.com/repos/cmderdev/cmder/issues/1846/labels{/name}","comments_url":"https://api.github.com/repos/cmderdev/cmder/issues/1846/comments","events_url":"https://api.github.com/repos/cmderdev/cmder/issues/1846/events","html_url":"https://github.com/cmderdev/cmder/issues/1846","id":347318083,"node_id":"MDU6SXNzdWUzNDczMTgwODM=","number":1846,"title":"Azure CLI  'C:\\Program' is not recognized as an internal or external command, operable program or batch file.","user":{"login":"paulmackinnon-adv365","id":32635002,"node_id":"MDQ6VXNlcjMyNjM1MDAy","avatar_url":"https://avatars3.githubusercontent.com/u/32635002?v=4","gravatar_id":"","url":"https://api.github.com/users/paulmackinnon-adv365","html_url":"https://github.com/paulmackinnon-adv365","followers_url":"https://api.github.com/users/paulmackinnon-adv365/followers","following_url":"https://api.github.com/users/paulmackinnon-adv365/following{/other_user}","gists_url":"https://api.github.com/users/paulmackinnon-adv365/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmackinnon-adv365/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmackinnon-adv365/subscriptions","organizations_url":"https://api.github.com/users/paulmackinnon-adv365/orgs","repos_url":"https://api.github.com/users/paulmackinnon-adv365/repos","events_url":"https://api.github.com/users/paulmackinnon-adv365/events{/privacy}","received_events_url":"https://api.github.com/users/paulmackinnon-adv365/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-03T09:06:46Z","updated_at":"2018-09-04T13:36:37Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n\r\n  Thank you for reporting a bug for the Cmder project!\r\n  ------------------------------------------------------------------\r\n  \r\n  Please make sure you read and follow the following instructions\r\n  carefully before reporting bugs, and/or requesting new features.\r\n  \r\n  Make sure that you have:\r\n  \r\n  • Searched for existing issues (including the **closed** ones)\r\n    for the similar problems here:\r\n    https://github.com/cmderdev/cmder/issues?q=is:issue\r\n    \r\n  • Read the README.md and the Wiki:\r\n    - https://github.com/cmderdev/cmder/blob/master/README.md\r\n    - https://github.com/cmderdev/cmder/wiki\r\n    \r\n    (What you may be asking here could already be explained there!)\r\n    \r\n  • Please understand that Cmder by default uses ConEmu as the\r\n    underlying Terminal Emulator. If your issue is regarding\r\n    the **Terminal Emulator**, please visit the ConEmu issues page:\r\n    \r\n    https://github.com/Maximus5/ConEmu/issues?q=is:issue\r\n    \r\n    If there isn't an existing issue, you may open a new one there.\r\n    \r\n    (We don't resolve issues regarding ConEmu here, so please \r\n     make sure you open the issue in the correct place.)\r\n\r\n    more info: https://conemu.github.io/en/ThirdPartyProblems.html\r\n     \r\n  • If you are asking for guides on how to integrate Cmder into\r\n    your favorite IDE of choice, or how to perform an specific\r\n    task with Cmder, make sure you visit our label section first!\r\n    You may already have an answer under the Guides or Questions section.\r\n\r\n    For a list of labels, visit:\r\n    - https://github.com/cmderdev/cmder/labels\r\n\r\n    (Be sure to also check “Closed” issues in the labels section!)\r\n     \r\n  • If the issue is regarding the other upstream technologies that\r\n    Cmder uses (e.g. Clink, Git, etc), please make sure that the\r\n    bug you are reporting only applies when they are used in\r\n    combination with Cmder. If the bug applies when the mentioned\r\n    tools are NOT used within Cmder, there's a good chance that\r\n    you should open the bug at the corresponding repo instead.\r\n\r\n    Read more on about Cmder on ConEmu docs:\r\n    https://conemu.github.io/en/cmder.html\r\n    \r\n    \r\n  Thank you for making sure you are opening a new valid issue!\r\n  \r\n-->\r\n\r\n<!-- \r\n  Some tips on how to write a better report:\r\n  - Put an `x` into all the boxes [ ] relevant to your issue (example: [x]).\r\n  - Use the *Preview* tab to see how your issue will actually look like, before sending it.\r\n  - Make sure the description is worded well enough to be understood, and with as much context and examples as possible.\r\n  - Post a screenshot or the command the triggered the problem, if applicable.\r\n  - Avoid using ambiguous phrases like: doesn't work, there'a problem, etc.\r\n    Help us reproduce the issue by explaining what went wrong, and what did you expect to happen.\r\n  - Please keep the ticket language to English only here.\r\n    We can't process your issue if it's written in Russian or Chinese as we can't understand them.\r\n  - ⚠ Read the following page to avoid posting a bad issue: https://conemu.github.io/en/BadIssue.html\r\n-->\r\n\r\n### Purpose of the issue\r\n- [X] Bug report (encountered problems/errors)\r\n- [ ] Feature request (request for new functionality)\r\n- [ ] Question\r\n\r\n### Description of the issue \r\n<!-- Provide a clear, simple description of your issue here -->\r\nUnable to run any Azure CLI commands from CMDER, keep getting the error: \r\n\r\n`'C:\\Program' is not recognized as an internal or external command, operable program or batch file.`\r\n\r\nFull example of what I'm trying to:\r\n\r\n```\r\nuser.name@BRM-19822-L ~/OneDrive/cmder\r\nλ username=$(az account show --query user.name --output tsv)\r\n\r\nuser.name@BRM-19822-L ~/OneDrive/cmder\r\nλ vm=$(az vm show --resource-group chkprm-compute --name asdfmmon0 --query id -o tsv)\r\n\r\nuser.name@BRM-19822-L ~/OneDrive/cmder\r\nλ az role assignment create --role \"Virtual Machine Administrator Login\" --assignee $username --scope $vm\r\n\r\n'C:\\Program' is not recognized as an internal or external command, operable program or batch file.\r\n```\r\n\r\nInstall locations:\r\nCMDER:  C:\\Users\\*USER*\\OneDrive\\cmder\r\nAz CLI:  C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin\\az.cmd\r\n\r\nEnvironment set for Az CLI:\r\nC:\\Users\\*USER*\\OneDrive\\cmder\\config\\user-profile.sh\r\n\r\nwhere this is set so I don't have to type az.cmd each time:\r\n`alias az='az.cmd'`\r\n\r\nNow it's obvious that CMDER breaks when accessing the full path of az.cmd when it comes across the first 'space' in the path name. Sadly, I cannot change the program path of CLI during install. Thanks Microsoft. So, does anyone know how I can reference this without it breaking, please?"},"comment":{"url":"https://api.github.com/repos/cmderdev/cmder/issues/comments/418369595","html_url":"https://github.com/cmderdev/cmder/issues/1846#issuecomment-418369595","issue_url":"https://api.github.com/repos/cmderdev/cmder/issues/1846","id":418369595,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODM2OTU5NQ==","user":{"login":"paulmackinnon-adv365","id":32635002,"node_id":"MDQ6VXNlcjMyNjM1MDAy","avatar_url":"https://avatars3.githubusercontent.com/u/32635002?v=4","gravatar_id":"","url":"https://api.github.com/users/paulmackinnon-adv365","html_url":"https://github.com/paulmackinnon-adv365","followers_url":"https://api.github.com/users/paulmackinnon-adv365/followers","following_url":"https://api.github.com/users/paulmackinnon-adv365/following{/other_user}","gists_url":"https://api.github.com/users/paulmackinnon-adv365/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmackinnon-adv365/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmackinnon-adv365/subscriptions","organizations_url":"https://api.github.com/users/paulmackinnon-adv365/orgs","repos_url":"https://api.github.com/users/paulmackinnon-adv365/repos","events_url":"https://api.github.com/users/paulmackinnon-adv365/events{/privacy}","received_events_url":"https://api.github.com/users/paulmackinnon-adv365/received_events","type":"User","site_admin":false},"created_at":"2018-09-04T13:36:37Z","updated_at":"2018-09-04T13:36:37Z","author_association":"NONE","body":"This is probably not a great example now, but this does happen with a lot of other commands. So much so, that I ended giving up on  cmder for any Az commands and instead loaded Ubuntu in VMWare just for this. Anyway, here is the output of the command in PowerShell (cmd does not like variables), an altered command, because the ones you see listed above do not work for anything else but Linux. In addition to that, it did fail, but took about 4-5min to bring back an error;\r\n\r\n```\r\n$username = az account show --query user.name --output tsv\r\n$vm = az vm show --resource-group MyResourceGroup --name MyServer --query id -o tsv\r\naz role assignment create --role \"Virtual Machine Administrator Login\" --assignee $username --scope $vm\r\n\r\n\r\n\r\nPS C:\\Users\\paul.mackinnon> az role assignment create --role \"Virtual Machine Administrator Login\" --assignee $username --scope $vm\r\naz : ERROR: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/MySubScription\r\n/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyServer/providers/Microsoft.Authorization/roleAssignments/705356c0-1f2a-420e-9fdf-aa821f70076f?api-version=2018-01\r\n-01-preview (Caused by ResponseError('too many 504 error responses',))\r\nAt line:1 char:1\r\n+ az role assignment create --role \"Virtual Machine Administrator Login ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (ERROR: Error oc...r responses',)):String) [], RemoteException\r\n    + FullyQualifiedErrorId : NativeCommandError\r\n \r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\adapters.py\", line 445, in send\r\n    timeout=timeout\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\urllib3\\connectionpool.py\", line 731, in urlopen\r\n    body_pos=body_pos, **response_kw)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\urllib3\\connectionpool.py\", line 731, in urlopen\r\n    body_pos=body_pos, **response_kw)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\urllib3\\connectionpool.py\", line 731, in urlopen\r\n    body_pos=body_pos, **response_kw)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\urllib3\\connectionpool.py\", line 711, in urlopen\r\n    retries = retries.increment(method, url, response=response, _pool=self)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\urllib3\\util\\retry.py\", line 398, in increment\r\n    raise MaxRetryError(_pool, url, error or ResponseError(cause))\r\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/MySubScription/resourceGroups/\r\nMyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyServer/providers/Microsoft.Authorization/roleAssignments/705356c0-1f2a-420e-9fdf-aa821f70076f?api-version=2018-01-01-preview \r\n(Caused by ResponseError('too many 504 error responses',))\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\service_client.py\", line 342, in send\r\n    response = http_driver.send(request, **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\service_client.py\", line 187, in send\r\n    **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\sessions.py\", line 512, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\sessions.py\", line 622, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\adapters.py\", line 504, in send\r\n    raise RetryError(e, request=request)\r\nrequests.exceptions.RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/MySubScription/resourceGroups/\r\nMyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyServer/providers/Microsoft.Authorization/roleAssignments/705356c0-1f2a-420e-9fdf-aa821f70076f?api-version=2018-01-01-preview (Caused \r\nby ResponseError('too many 504 error responses',))\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\knack\\cli.py\", line 197, in invoke\r\n    cmd_result = self.invocation.execute(args)\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-core\\azure\\cli\\core\\commands\\__init__.py\", line 369, in execute\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\six.py\", line 693, in reraise\r\n    raise value\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-core\\azure\\cli\\core\\commands\\__init__.py\", line 343, in execute\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-core\\azure\\cli\\core\\commands\\__init__.py\", line 182, in __call__\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-core\\azure\\cli\\core\\__init__.py\", line 436, in default_command_handler\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-role\\azure\\cli\\command_modules\\role\\custom.py\", line 132, in create_role_assignment\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-cli-role\\azure\\cli\\command_modules\\role\\custom.py\", line 151, in _create_role_assig\r\nnment\r\n  File \"C:\\Users\\trdai\\AppData\\Local\\Temp\\pip-install-17ev678d\\azure-mgmt-authorization\\azure\\mgmt\\authorization\\operations\\role_assignments_operations.py\", line 322, in create\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\service_client.py\", line 369, in send\r\n    raise_with_traceback(ClientRequestError, msg, err)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\exceptions.py\", line 54, in raise_with_traceback\r\n    raise error.with_traceback(exc_traceback)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\service_client.py\", line 342, in send\r\n    response = http_driver.send(request, **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\msrest\\service_client.py\", line 187, in send\r\n    **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\sessions.py\", line 512, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\sessions.py\", line 622, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\Lib\\site-packages\\requests\\adapters.py\", line 504, in send\r\n    raise RetryError(e, request=request)\r\nmsrest.exceptions.ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/-\r\nMySubScription/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyServer/providers/Microsoft.Authorization/roleAssignments/705356c0-1f2a-420e-9fdf-aa821f\r\n70076f?api-version=2018-01-01-preview (Caused by ResponseError('too many 504 error responses',))\r\n```\r\n\r\n\r\nIf I repeat the command in cmder as initially stated, it would error immediately. I would like to give you more varied commands that fail, but as I said, I gave up on cmder and Az working together."}}
{"actor":{"display_login":"paulmackinnon-adv365"}}