diff options
| author | Saikari <[email protected]> | 2026-01-27 00:44:11 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-01-27 00:44:11 +0300 |
| commit | 14b0f24fc76004d1498fa7f85a6c2377b2fbd722 (patch) | |
| tree | 4f5512ecbcc9a5b5a849b0badaff29a9e9739f41 | |
| parent | 8855fb1173ed118bda8e75ccd75c1b0db26bdcf7 (diff) | |
add support for PowerShell in shell detection
| -rw-r--r-- | xmake/core/base/tty.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua index 39c4c0d31..51c301ab4 100644 --- a/xmake/core/base/tty.lua +++ b/xmake/core/base/tty.lua @@ -314,7 +314,7 @@ function tty.shell() if shell_name then shell_name = shell_name:gsub("^-", "") - for _, name in ipairs({"zsh", "bash", "fish", "nu", "elvish", "sh"}) do + for _, name in ipairs({"zsh", "bash", "fish", "nu", "elvish", "pwsh", "sh"}) do if shell_name == name then shell = name break @@ -335,7 +335,7 @@ function tty.shell() if not shell then shell = os.getenv("SHELL") if shell then - for _, shellname in ipairs({"zsh", "bash", "fish", "nu", "elvish", "sh"}) do + for _, shellname in ipairs({"zsh", "bash", "fish", "nu", "elvish", "pwsh", "sh"}) do if shell:find(shellname) then shell = shellname break |
