Skip to content

Commit

Permalink
revert: rollback default shell resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 15, 2022
1 parent 9e609c1 commit da2af58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ $.quote = quote
$.spawn = spawn
$.verbose = true
$.prefix = '' // Bash not found, no prefix.
try {
$.shell = which.sync('bash')
$.prefix = 'set -euo pipefail;'
} catch (e) {
}

export function cd(path) {
if ($.verbose) console.log('$', colorize(`cd ${path}`))
Expand Down
6 changes: 0 additions & 6 deletions zx.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ await async function main() {
$.verbose = !argv.quiet
if (typeof argv.shell === 'string') {
$.shell = argv.shell
} else {
try {
$.shell = which.sync('bash')
$.prefix = 'set -euo pipefail;'
} catch (e) {
}
}
if (typeof argv.prefix === 'string') {
$.prefix = argv.prefix
Expand Down

0 comments on commit da2af58

Please sign in to comment.