@@ -30,13 +30,13 @@ export interface EnvironmentOptions {
3030
3131export const DEFAULT_OUTPUT_FILE = 'index.scip' ;
3232
33- const parseOptionalInt = ( value : string ) => {
33+ const parseOptionalNum = ( value : string ) => {
3434 if ( value === undefined ) {
3535 return undefined ;
3636 }
3737
3838 // parseInt takes a string and a radix
39- const parsedValue = parseInt ( value , 10 ) ;
39+ const parsedValue = parseFloat ( value ) ;
4040 if ( isNaN ( parsedValue ) ) {
4141 throw new InvalidArgumentError ( 'Not a number.' ) ;
4242 }
@@ -60,7 +60,11 @@ export function mainCommand(
6060 . option ( '--snapshot-dir <path>' , 'the directory to output a snapshot of the SCIP dump' )
6161 . option ( '--no-progress-bar' , '(deprecated, use "--quiet")' )
6262 . option ( '--quiet' , 'run without logging and status information' , false )
63- . option ( '--show-progress-rate-limit <limit>' , 'number of times to show progress per minute' , parseOptionalInt )
63+ . option (
64+ '--show-progress-rate-limit <limit>' ,
65+ 'minimum number of seconds between progress messages in the output.' ,
66+ parseOptionalNum
67+ )
6468 . option ( '--environment <json-file>' , 'the environment json file (experimental)' )
6569 . option ( '--include <pattern>' , 'comma-separated list of patterns to include (experimental)' )
6670 . option ( '--exclude <pattern>' , 'comma-separated list of patterns to exclude (experimental)' )
@@ -81,7 +85,11 @@ export function mainCommand(
8185 . option ( '--no-index' , 'skip indexing (use existing index.scip)' )
8286 . option ( '--no-progress-bar' , '(deprecated, use "--quiet")' )
8387 . option ( '--quiet' , 'run without logging and status information' , false )
84- . option ( '--show-progress-rate-limit <limit>' , 'number of times to show progress per minute' , parseOptionalInt )
88+ . option (
89+ '--show-progress-rate-limit <limit>' ,
90+ 'minimum number of seconds between progress messages in the output.' ,
91+ parseOptionalNum
92+ )
8593 . action ( ( dir , parsedOptions ) => {
8694 snapshotAction ( dir , parsedOptions as SnapshotOptions ) ;
8795 } ) ;
0 commit comments