Skip to content

Commit

Permalink
Do not throw on win which
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv authored Feb 28, 2023
1 parent a3753b1 commit 4868d7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ try {
defaults.quote = quote
} catch (err) {
if (process.platform == 'win32') {
defaults.shell = which.sync('powershell.exe')
defaults.quote = quotePowerShell
try {
defaults.shell = which.sync('powershell.exe')
defaults.quote = quotePowerShell
} catch (err) {
// no powershell?
}
}
}

Expand Down

0 comments on commit 4868d7c

Please sign in to comment.