Skip to content

Commit

Permalink
fix: the shell option value should be optional instead of required
Browse files Browse the repository at this point in the history
This fixes a bug introduced in #994 where any text after the `--shell` option was interpreted as its value, for example in `--shell  --relative` the value was `"--relative"` instead of implied `true`.
  • Loading branch information
iiroj committed Jul 24, 2021
1 parent fea8033 commit b6bfa58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -71,7 +71,7 @@ Options:
tasks serially (default: true)
-q, --quiet disable lint-staged’s own console output (default: false)
-r, --relative pass relative filepaths to tasks (default: false)
-x, --shell <path> skip parsing of tasks for better shell support (default:
-x, --shell [path] skip parsing of tasks for better shell support (default:
false)
-v, --verbose show task output even when tasks succeed; by default only
failed output is shown (default: false)
Expand Down
2 changes: 1 addition & 1 deletion bin/lint-staged.js
Expand Up @@ -42,7 +42,7 @@ cmdline
)
.option('-q, --quiet', 'disable lint-staged’s own console output', false)
.option('-r, --relative', 'pass relative filepaths to tasks', false)
.option('-x, --shell <path>', 'skip parsing of tasks for better shell support', false)
.option('-x, --shell [path]', 'skip parsing of tasks for better shell support', false)
.option(
'-v, --verbose',
'show task output even when tasks succeed; by default only failed output is shown',
Expand Down

0 comments on commit b6bfa58

Please sign in to comment.