[PR #8197] Azure: fall back to powershell when no preferred shell is set #27138

Closed
opened 2026-01-31 09:20:13 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8197

State: closed
Merged: Yes


Fallback to powershell if "preferred shell" is not specified in the user
settings of Azure CLI.

I am still not sure what is the full set of scenarios that the problem
might occur, but for me it occurred for an "old" cloud shell account,
and didn't reproduce since I have reconfigured it. These behavior might
be explained by the fact that "preferred shell type" did not exist in
the API originally and thus was not set. In such case, Terminal
succeeds to retrieve to the settings but then crashes when reading the
missing field. To fix it, I handle the case where the field is missing
and fallback to powershell

Validation Steps Performed

  • Tested manually, only once.

Closes #7056

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8197 **State:** closed **Merged:** Yes --- Fallback to powershell if "preferred shell" is not specified in the user settings of Azure CLI. I am still not sure what is the full set of scenarios that the problem might occur, but for me it occurred for an "old" cloud shell account, and didn't reproduce since I have reconfigured it. These behavior might be explained by the fact that "preferred shell type" did not exist in the API originally and thus was not set. In such case, Terminal succeeds to retrieve to the settings but then crashes when reading the missing field. To fix it, I handle the case where the field is missing and fallback to powershell ## Validation Steps Performed * Tested manually, only once. Closes #7056
claunia added the pull-request label 2026-01-31 09:20:13 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27138