-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
When running the az aks bastion ... from PowerShell 7 on Windows 11 (via Windows Terminal) command we end up with
Launching subshell with command 'cmd.exe'.
Based on the logic here
azure-cli-extensions/src/aks-preview/azext_aks_preview/bastion/bastion.py
Lines 237 to 242 in ecb6680
| def _aks_bastion_get_current_shell_cmd(): | |
| """Get the current shell command being used by the parent process.""" | |
| ppid = os.getppid() | |
| parent = psutil.Process(ppid) | |
| return parent.name() |
Related command
az aks bastion --name xx --resource-group yyy --bastion zz
Errors
No error
Issue script & Debug output
Not relevant
Expected behavior
Would expect the subshell launched to be of type pwsh.exe
Environment Summary
azure-cli 2.75.0 *
core 2.75.0 *
telemetry 1.1.0
Extensions:
aks-preview 18.0.0b26
bastion 1.4.0
ssh 2.0.6
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\xxx.azure'
Extensions directory 'C:\Users\xxx.azure\cliextensions'
Python (Windows) 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
Additional context
No response