Skip to content

Commit f7302f4

Browse files
authored
fix: the shell option value should be optional instead of required (#996)
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`.
1 parent fea8033 commit f7302f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Options:
7171
tasks serially (default: true)
7272
-q, --quiet disable lint-staged’s own console output (default: false)
7373
-r, --relative pass relative filepaths to tasks (default: false)
74-
-x, --shell <path> skip parsing of tasks for better shell support (default:
74+
-x, --shell [path] skip parsing of tasks for better shell support (default:
7575
false)
7676
-v, --verbose show task output even when tasks succeed; by default only
7777
failed output is shown (default: false)

bin/lint-staged.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cmdline
4242
)
4343
.option('-q, --quiet', 'disable lint-staged’s own console output', false)
4444
.option('-r, --relative', 'pass relative filepaths to tasks', false)
45-
.option('-x, --shell <path>', 'skip parsing of tasks for better shell support', false)
45+
.option('-x, --shell [path]', 'skip parsing of tasks for better shell support', false)
4646
.option(
4747
'-v, --verbose',
4848
'show task output even when tasks succeed; by default only failed output is shown',

0 commit comments

Comments
 (0)