Skip to content

Commit

Permalink
fix: the shell option value should be optional instead of required (#996
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 authored Jul 24, 2021
1 parent fea8033 commit f7302f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 f7302f4

Please sign in to comment.