Skip to content

Commit

Permalink
Update end of line to lf
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 4, 2022
1 parent 3bc2ce3 commit cfa0fba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
],
"prettier": {
"semi": false,
"singleQuote": true
"singleQuote": true,
"endOfLine": "lf"
},
"repository": "google/zx",
"author": "Anton Medvedev <anton@medv.io>",
Expand Down
9 changes: 7 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,20 @@ export const defaults: Options = {
env: process.env,
shell: true,
prefix: '',
quote,
quote: () => {
throw new Error('No quote function is defined: https://ï.at/no-quote-func')
},
spawn,
log,
}

try {
if (process.platform !== 'win32') {
if (process.platform == 'win32') {
defaults.shell = true
} else {
defaults.shell = which.sync('bash')
defaults.prefix = 'set -euo pipefail;'
defaults.quote = quote
}
} catch (err) {
// ¯\_(ツ)_/¯
Expand Down

0 comments on commit cfa0fba

Please sign in to comment.