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

feat: permission stack traces in ops #26938

Merged
merged 8 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
crowlKats committed Nov 20, 2024
commit 2286e5293e95ca99329a3d2c5d25312b93aae960
2 changes: 1 addition & 1 deletion cli/lsp/tsc.rs
Original file line number Diff line number Diff line change
@@ -5609,7 +5609,7 @@ mod tests {
let (_tx, rx) = mpsc::unbounded_channel();
let state =
State::new(state_snapshot, Default::default(), Default::default(), rx);
let mut op_state = OpState::new(None);
let mut op_state = OpState::new(None, None);
op_state.put(state);
op_state
}
2 changes: 1 addition & 1 deletion cli/tsc/mod.rs
Original file line number Diff line number Diff line change
@@ -1198,7 +1198,7 @@ mod tests {
.context("Unable to get CWD")
.unwrap(),
);
let mut op_state = OpState::new(None);
let mut op_state = OpState::new(None, None);
op_state.put(state);
op_state
}
4 changes: 2 additions & 2 deletions tests/integration/run_tests.rs
Original file line number Diff line number Diff line change
@@ -339,8 +339,8 @@ fn permissions_prompt_allow_all_2() {
// "env" permissions
console.expect(concat!(
"┏ ⚠️ Deno requests env access to \"FOO\".\r\n",
"┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n",
"┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n",
"┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n",
"┠─ Run again with --allow-env to bypass this prompt.\r\n",
"┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)",
));
@@ -1731,8 +1731,8 @@ fn issue9750() {
console.expect("Denied env access.");
console.expect(concat!(
"┏ ⚠️ Deno requests env access to \"SECRET\".\r\n",
"┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n",
"┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n",
"┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n",
"┠─ Run again with --allow-env to bypass this prompt.\r\n",
"┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)",
));
Loading