mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 13:00:36 -05:00
05dc69932d
Shifts just some code down for now. I'll do the rest of the refactor in the next pr, but didn't want to drop a huge refactor.
10 lines
291 B
Rust
10 lines
291 B
Rust
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
|
|
pub fn has_trace_permissions_enabled() -> bool {
|
|
has_flag_env_var("DENO_TRACE_PERMISSIONS")
|
|
}
|
|
|
|
pub fn has_flag_env_var(name: &str) -> bool {
|
|
let value = std::env::var(name);
|
|
matches!(value.as_ref().map(|s| s.as_str()), Ok("1"))
|
|
}
|