diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-10-12 17:55:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 15:55:50 +0000 |
commit | c464cd7073c761780b3170a48542c387560e3f26 (patch) | |
tree | 881a26d05423f9c696c8f35ce8bd2d72d562b1ea /runtime/ops/process.rs | |
parent | 5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff) |
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'runtime/ops/process.rs')
-rw-r--r-- | runtime/ops/process.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index 51c9f961a..1fdd4bf4d 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -34,6 +34,8 @@ use std::os::unix::prelude::ExitStatusExt; #[cfg(unix)] use std::os::unix::process::CommandExt; +pub const UNSTABLE_FEATURE_NAME: &str = "process"; + #[derive(Copy, Clone, Eq, PartialEq, Deserialize)] #[serde(rename_all = "camelCase")] pub enum Stdio { @@ -503,7 +505,7 @@ mod deprecated { cwd.map(|d| c.current_dir(d)); if run_args.clear_env { - super::check_unstable(state, "Deno.run.clearEnv"); + super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.run.clearEnv"); c.env_clear(); } for (key, value) in &env { @@ -512,12 +514,12 @@ mod deprecated { #[cfg(unix)] if let Some(gid) = run_args.gid { - super::check_unstable(state, "Deno.run.gid"); + super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.run.gid"); c.gid(gid); } #[cfg(unix)] if let Some(uid) = run_args.uid { - super::check_unstable(state, "Deno.run.uid"); + super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.run.uid"); c.uid(uid); } #[cfg(unix)] |