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

UI/UX ~ avoid Deno permissions prompt when importing module #2216

Open
rivy opened this issue Jul 27, 2022 · 0 comments
Open

UI/UX ~ avoid Deno permissions prompt when importing module #2216

rivy opened this issue Jul 27, 2022 · 0 comments

Comments

@rivy
Copy link
Contributor

rivy commented Jul 27, 2022

As currently written (in v17.5.1), the deno platform shim will unavoidably prompt the user for 'env' and 'read' permissions if not already granted when the module is imported.

image

No matter which answers are given, the module is imported without error.

But this is a forced UI/UX interaction that the most user scripts would want to avoid, instead giving user feedback in accordance to the script's own UI/UX plan. This could be especially problematic for CI where there is no user at the keyboard to answer.

A small change to the use of permission queries instead of using try/catch can fix this behavior while keeping the fallback values in place for the cwd and env variables (see PR #2217).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants