Skip to content

Commit

Permalink
fix: recognize PowerShell 7 as pwsh.exe (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Apr 29, 2024
1 parent 5b01d7c commit f14bb52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- The [Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) is now a soft dependency and is no longer installed by default with the Shiny for VS Code extension. (#30)
- Added a new setting, `shiny.previewType`, to control where the Shiny app preview should be opened. (#40)
- Added a new `shinyexpress` snippet to quickly create a basic Shiny Express app in Python. (#42)
- The extension now correctly escapes commands on PowerShell 7 where the binary is named `pwsh.exe`. (#48)

## 0.1.6

Expand Down
2 changes: 1 addition & 1 deletion src/shell-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function escapeStyle(terminal: vscode.Terminal): EscapeStyle {

if (/\bcmd\.exe$/i.test(shellPath)) {
return "cmd";
} else if (/\bpowershell.exe$/i.test(shellPath)) {
} else if (/\b(powershell|pwsh).exe$/i.test(shellPath)) {
return "ps";
} else {
return "sh";
Expand Down

0 comments on commit f14bb52

Please sign in to comment.