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 commented Feb 7, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

Thanks! Just one comment...

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

Copy link
Member

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

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

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 February 7, 2020 02:54
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants