deno icon indicating copy to clipboard operation
deno copied to clipboard

fix(permissions): Disable prompt in `Deno.permissions.request()` when `--no-prompt` set

Open tom-sherman opened this issue 1 year ago • 3 comments

Closes #14668

tom-sherman avatar Sep 10 '22 23:09 tom-sherman

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 10 '22 23:09 CLAassistant

In default implementation of Permissions, it seems setting false to prompt and that seems causing test failures. https://github.com/denoland/deno/blob/cc98a38c3a235536481550273e185651806e69e2/runtime/permissions.rs#L1161-L1173

Can you update it to pass the test cases? (Default impl itself seems used in create_child_permissions. Probably it's not good idea to change default implementation. Maybe let's use literal construction in test cases)

Also can you add test cases (like test_request_no_prompt next to test_request) which performs the similar checks but with prompt: false

kt3k avatar Sep 13 '22 08:09 kt3k

Yep! I'll come back around to this in a few days, sorry should have marked the PR as WIP - will do that now.

tom-sherman avatar Sep 13 '22 08:09 tom-sherman

Hi @tom-sherman, thanks for the PR. I'm still interested in landing it, would you mind resolving merge conflicts?

bartlomieju avatar Oct 28 '22 20:10 bartlomieju

@bartlomieju I don't think I'm going to be able to complete this, I'm having serious trouble building the project on my current machine. Going to close this PR so someone else can start work on it.

tom-sherman avatar Nov 03 '22 15:11 tom-sherman