Skip to content

Commit 4883e84

Browse files
committed
Always try bash first
1 parent 691e6cb commit 4883e84

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/core.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,14 @@ export const defaults: Options = {
7575
}
7676

7777
try {
78+
defaults.shell = which.sync('bash')
79+
defaults.prefix = 'set -euo pipefail;'
80+
defaults.quote = quote
81+
} catch (err) {
7882
if (process.platform == 'win32') {
7983
defaults.shell = which.sync('powershell.exe')
8084
defaults.quote = quotePowerShell
81-
} else {
82-
defaults.shell = which.sync('bash')
83-
defaults.prefix = 'set -euo pipefail;'
84-
defaults.quote = quote
8585
}
86-
} catch (err) {
87-
// ¯\_(ツ)_/¯
8886
}
8987

9088
function getStore() {

0 commit comments

Comments
 (0)