Skip to content
Browse files
fix: correctly handle --max-arg-length cli option
  • Loading branch information
Ilia_Khrebtov authored and iiroj committed May 24, 2022
1 parent f0536dc commit 1db5f2651d7f41c56f3ee1eacb57f1be1566bce2
Showing 1 changed file with 2 additions and 2 deletions.
@@ -34,7 +34,7 @@ cmdline
.option('-c, --config [path]', 'path to configuration file, or - to read from stdin')
.option('--cwd [path]', 'run all tasks in specific directory, instead of the current')
.option('-d, --debug', 'print additional debug information', false)
.option('--max-arg-length', 'maximum length of the command-line argument string')
.option('--max-arg-length [number]', 'maximum length of the command-line argument string', 0)
.option('--no-stash', 'disable the backup stash, and do not revert in case of errors', false)
.option('-q, --quiet', 'disable lint-staged’s own console output', false)
.option('-r, --relative', 'pass relative filepaths to tasks', false)
@@ -61,7 +61,7 @@ const options = {
configPath: cmdlineOptions.config,
cwd: cmdlineOptions.cwd,
debug: !!cmdlineOptions.debug,
maxArgLength: JSON.parse(cmdlineOptions.maxArgLength || null),
maxArgLength: cmdlineOptions.maxArgLength || undefined,
quiet: !!cmdlineOptions.quiet,
relative: !!cmdlineOptions.relative,
shell: /* Either a boolean or a string pointing to the shell */,

0 comments on commit 1db5f26

Please sign in to comment.