Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli/flags.rs): Prevent providing --allow-env flag twice #3906

Merged
merged 1 commit into from Feb 7, 2020

Conversation

niceb5y
Copy link
Contributor

@niceb5y niceb5y commented Feb 7, 2020

  if self.allow_env {
      args.push("--allow-env".to_string());
    }

was duplicated in cli/flag.rs

Duplication causes the problem when deno install --allow-env

error: The argument '--allow-env' was provided more than once, but cannot be used multiple times

USAGE:
    deno run --allow-env --allow-net=<allow-net> --allow-read=<allow-read>

For more information try --help

@claassistantio
Copy link

@claassistantio claassistantio commented Feb 7, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ry ry left a comment

Thanks! Just one comment...

if self.allow_env {
args.push("--allow-env".to_string());
}

Copy link
Member

@ry ry Feb 7, 2020

Choose a reason for hiding this comment

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

Add a comment about how allow_env is implied. Or filter it during install.

Copy link
Contributor Author

@niceb5y niceb5y Feb 7, 2020

Choose a reason for hiding this comment

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

‘allow_env’ already processed L142-L144

Or am i miss some intentions that it is processed twice?

Copy link
Member

@ry ry Feb 7, 2020

Choose a reason for hiding this comment

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

oops! no- thank you!

@niceb5y niceb5y requested a review from ry Feb 7, 2020
ry
ry approved these changes Feb 7, 2020
Copy link
Member

@ry ry left a comment

LGTM

@ry ry merged commit 522e856 into denoland:master Feb 7, 2020
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants