nexmo-developer icon indicating copy to clipboard operation
nexmo-developer copied to clipboard

Bug on Vonage CLI command vonage jwt --exp

Open gcp0609 opened this issue 4 years ago • 1 comments

when run Vonage CLI command vonage jwt with --exp, there is an error Error: "exp" should be a number of seconds it is because the number is treated as string, and JWT throw the error. I just added one line in the file @vonage/cli/node_modules/@oclif/parser/lib/parse.js and convert the string to number as a workaround. Need experts to check and fix it.

origin: line 80 this.raw.push({ type: 'flag', flag: flag.name, input }); add one line before if ((flag.name == 'exp') && (! isNaN(input))) { input = parseInt(input) }

gcp0609 avatar Oct 20 '21 17:10 gcp0609