File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ function parseOptions(args) {
414
414
"test_folder" : "" ,
415
415
"test_file" : "" ,
416
416
} ;
417
- var correspondances = {
417
+ var correspondences = {
418
418
"--resource-suffix" : "resource_suffix" ,
419
419
"--doc-folder" : "doc_folder" ,
420
420
"--test-folder" : "test_folder" ,
@@ -423,17 +423,13 @@ function parseOptions(args) {
423
423
} ;
424
424
425
425
for ( var i = 0 ; i < args . length ; ++ i ) {
426
- if ( args [ i ] === "--resource-suffix"
427
- || args [ i ] === "--doc-folder"
428
- || args [ i ] === "--test-folder"
429
- || args [ i ] === "--test-file"
430
- || args [ i ] === "--crate-name" ) {
426
+ if ( correspondences . hasOwnProperty ( args [ i ] ) ) {
431
427
i += 1 ;
432
428
if ( i >= args . length ) {
433
429
console . log ( "Missing argument after `" + args [ i - 1 ] + "` option." ) ;
434
430
return null ;
435
431
}
436
- opts [ correspondances [ args [ i - 1 ] ] ] = args [ i ] ;
432
+ opts [ correspondences [ args [ i - 1 ] ] ] = args [ i ] ;
437
433
} else if ( args [ i ] === "--help" ) {
438
434
showHelp ( ) ;
439
435
process . exit ( 0 ) ;
You can’t perform that action at this time.
0 commit comments