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

feat(runtime): Making --prompt the default behavior instead of throwing error #11588

Closed

Conversation

getspooky
Copy link
Contributor

Like browser permission experience, it would be more useful to include permission prompt by default instead of throwing error.

Please See Discussion: #10183

Example:

const json = fetch("https://api.github.com/users/denoland");

json
  .then((response) => {
    return response.json();
  })
  .then((jsonData) => {
    console.log(jsonData);
  });
deno run example.ts

Result:

⚠️  ️Deno requests net access to "api.github.com". Allow? [y/n (y = yes allow, n = no deny)] 

@crowlKats
Copy link
Member

Implementation is completely wrong: the goal is to make it the default behavior, aka having a no-prompt flag that allows it be disabled. Also this most definitively should not be done pre 2.0

@getspooky getspooky closed this Aug 5, 2021
@getspooky getspooky reopened this Aug 5, 2021
@bartlomieju
Copy link
Member

Thanks for opening the PR @getspooky but it's hasn't been yet agreed upon that we want to proceed with --prompt by default. Additionally there's quite a lot of auxiliary logic that will need to be implemented for this feature (eg. detecting if running in TTY). I'm going close it now, and let's drive discussion in #10183 home before implementing a PR.

@bartlomieju bartlomieju closed this Aug 6, 2021
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