mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
11 lines
291 B
Rust
11 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"))
|
||
|
}
|