Commit 4883e84

Anton Medvedev <anton@medv.io>
2022-10-07 07:53:45
Always try bash first
1 parent 691e6cb
Changed files (1)
src/core.ts
@@ -75,16 +75,14 @@ export const defaults: Options = {
 }
 
 try {
+  defaults.shell = which.sync('bash')
+  defaults.prefix = 'set -euo pipefail;'
+  defaults.quote = quote
+} catch (err) {
   if (process.platform == 'win32') {
     defaults.shell = which.sync('powershell.exe')
     defaults.quote = quotePowerShell
-  } else {
-    defaults.shell = which.sync('bash')
-    defaults.prefix = 'set -euo pipefail;'
-    defaults.quote = quote
   }
-} catch (err) {
-  // ¯\_(ツ)_/¯
 }
 
 function getStore() {