Skip to content

Commit 235f6f8

Browse files
author
Dan Foad
authored
Allow numeric CLI argument (microsoft#99540)
* safely convert to string before checking length * use String(arg) instead
1 parent b400bce commit 235f6f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/vs/platform/environment/node

src/vs/platform/environment/node/argv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
256256
const remainingArgs: any = parsedArgs;
257257

258258
// https://github.com/microsoft/vscode/issues/58177
259-
cleanedArgs._ = parsedArgs._.filter(arg => arg.length > 0);
259+
cleanedArgs._ = parsedArgs._.filter(arg => String(arg).length > 0);
260260

261261
delete remainingArgs._;
262262

0 commit comments

Comments
 (0)