You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the script, piping the output of another process to it, I am never shown the permission prompt (it is automatically denied):
% cat example.ts | deno run example.ts
Before request: PermissionStatus { state: "prompt", onchange: null }
After request: PermissionStatus { state: "denied", onchange: null }
error: Uncaught (in promise) PermissionDenied: Requires read access to "example.ts", run again with the --allow-read flag
await Deno.readTextFile("example.ts");
^
at unwrapOpResult (deno:core/core.js:100:13)
at async open (deno:runtime/js/40_files.js:46:17)
at async Object.readTextFile (deno:runtime/js/40_read_file.js:40:18)
at async file:///Users/jesse/example/example.ts:9:1
But if I simply run the script, I am presented the prompt:
% deno run example.ts
Before request: PermissionStatus { state: "prompt", onchange: null }
⚠️ ️Deno requests read access. Grant? [g/d (g = grant, d = deny)] g
After request: PermissionStatus { state: "granted", onchange: null }
This example script does not need data from stdin, but if another one did, how could it get it while still being able to prompt for permissions?
This discussion was converted from issue #10202 on June 08, 2021 16:25.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's an example script prompting for read permissions:
When I run the script, piping the output of another process to it, I am never shown the permission prompt (it is automatically denied):
But if I simply run the script, I am presented the prompt:
This example script does not need data from
stdin, but if another one did, how could it get it while still being able to prompt for permissions?Beta Was this translation helpful? Give feedback.
All reactions