-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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: permission stack traces in ops #26938
Conversation
@@ -3316,6 +3317,8 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { | |||
<p(245)>--deny-run | --deny-run="whoami,ps"</> | |||
<g>--deny-ffi[=<<PATH>...]</> (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files. | |||
<p(245)>--deny-ffi | --deny-ffi="./libfoo.so"</> | |||
<g>DENO_TRACE_PERMISSIONS</> Environmental variable to enable stack traces in permission prompts. | |||
<p(245)>DENO_TRACE_PERMISSIONS=1 deno run main.ts</> |
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.
added twice, once to the env docs and once to the perm docs for visibility
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.
LGTM!
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.
LGTM too
This commit improves permission prompts by adding an option to print a full trace of where the permissions is being requested. Due to big performance hint of stack trace collection, this is only enabled when `DENO_TRACE_PERMISSIONS` env var is present. Closes denoland#20756 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit improves permission prompts by adding an option
to print a full trace of where the permissions is being requested.
Due to big performance hint of stack trace collection, this is only
enabled when
DENO_TRACE_PERMISSIONS
env var is present.Closes #20756