Browse Source

clients/js: make arg parser strict

Now it shows help when passing incorrect arguments

why is this not the default?

commit-id:f86cdbd5
Csongor Kiss 3 năm trước cách đây
mục cha
commit
a9c3abf436
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      clients/js/main.ts

+ 4 - 1
clients/js/main.ts

@@ -700,7 +700,10 @@ yargs(hideBin(process.argv))
         impossible(chain);
       }
     }
-  ).argv;
+  )
+  .strict()
+  .demandCommand()
+  .argv;
 
 function hex(x: string): string {
   return ethers.utils.hexlify(x, { allowMissingPrefix: true });