-
-
Notifications
You must be signed in to change notification settings - Fork 67
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(help): Skip version checks if it will cause permission prompts #663
base: main
Are you sure you want to change the base?
feat(help): Skip version checks if it will cause permission prompts #663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for you pr @annervisser 👍 LGMT!
@c4spar anything I need to do to get those checks to run? |
Normally this should happen automatically. Looks like GitHub actions has a hickup. Maybe try to push something and then revert it. |
d9d6a6a
to
d406108
Compare
@c4spar "This workflow is awaiting approval from a maintainer in #663" |
thx @annervisser! i will merge it when i prepare the 1.0 release. |
504ba12
to
f54d4d7
Compare
@c4spar rebased onto main |
@annervisser, i noticed we could also implement this without a breaking change by using a try catch block and checking for a |
@c4spar That wouldn't stop Deno from prompting the user for permissions. My main motivation for this PR was that I disliked being prompted for network access when simply running |
855e144
to
75b5275
Compare
When a user hasn't granted net permissions to the default upgrade provider, they would be prompted to allow it when running the `help`/`--help` command. This commit adds an extra method to `Provider` where a provider should check any permissions it needs to return available versions have been pre-granted. If the necessary permissions have NOT been granted, the help command will skip checking for newer versions. The upgrade command is not affected. BREAKING CHANGE: Custom `Provider` implementations will have to implement `hasRequiredPermissions()`
75b5275
to
657c39b
Compare
feat(help): Skip version checks if it will cause permission prompts
When a user hasn't granted net permissions to the default upgrade provider,
they would be prompted to allow it when running the
help
/--help
command.This commit adds an extra method to
Provider
where a provider should checkany permissions it needs to return available versions have been pre-granted.
If the necessary permissions have NOT been granted, the help command will
skip checking for newer versions. The upgrade command is not affected.
BREAKING CHANGE: Custom
Provider
implementations will have to implementhasRequiredPermissions()