Skip to content

Allow numeric CLI argument#99540

Merged
joaomoreno merged 2 commits intomicrosoft:masterfrom
foad:df-98439-cli-number-only
Jun 8, 2020
Merged

Allow numeric CLI argument#99540
joaomoreno merged 2 commits intomicrosoft:masterfrom
foad:df-98439-cli-number-only

Conversation

@foad
Copy link
Contributor

@foad foad commented Jun 6, 2020

This PR fixes #98439

We were discarding empty args as part of #58177, however this would discard numbers too as they were not strings when the check took place

@foad foad force-pushed the df-98439-cli-number-only branch from 38a341f to b1f7e5b Compare June 6, 2020 23:22

// https://github.com/microsoft/vscode/issues/58177
cleanedArgs._ = parsedArgs._.filter(arg => arg.length > 0);
cleanedArgs._ = parsedArgs._.filter(arg => arg.toString?.().length > 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could String(arg) be a safer option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will switch it over sure 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@joaomoreno joaomoreno self-assigned this Jun 8, 2020
Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesomesauce, thanks!

@joaomoreno joaomoreno merged commit 235f6f8 into microsoft:master Jun 8, 2020
@joaomoreno joaomoreno added this to the June 2020 milestone Jun 8, 2020
@joaomoreno joaomoreno added the workbench-cli VS Code Command line issues label Jun 8, 2020
@foad foad deleted the df-98439-cli-number-only branch June 8, 2020 12:39
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

workbench-cli VS Code Command line issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OS X: Command line tool won't launch a file whose name is just a number

2 participants