From 71e4ac774bc18902a0d23f29d9b18b43b19bbbf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 3 Sep 2024 10:07:02 +0100 Subject: BREAKING(unstable): drop support for Deno.run.{clearEnv,gid,uid} (#25371) These are unstable options and the APIs is now deprecated. To limit amount of unstable flags we elected to have these APIs removed. --- runtime/ops/process.rs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'runtime/ops') diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index 25edfe662..11e439051 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use super::check_unstable; use deno_core::anyhow::Context; use deno_core::error::type_error; use deno_core::error::AnyError; @@ -642,12 +641,7 @@ mod deprecated { pub struct RunArgs { cmd: Vec, cwd: Option, - clear_env: bool, env: Vec<(String, String)>, - #[cfg(unix)] - gid: Option, - #[cfg(unix)] - uid: Option, stdin: StdioOrRid, stdout: StdioOrRid, stderr: StdioOrRid, @@ -700,24 +694,10 @@ mod deprecated { }); cwd.map(|d| c.current_dir(d)); - if run_args.clear_env { - super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.run.clearEnv"); - c.env_clear(); - } for (key, value) in &env { c.env(key, value); } - #[cfg(unix)] - if let Some(gid) = run_args.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, UNSTABLE_FEATURE_NAME, "Deno.run.uid"); - c.uid(uid); - } #[cfg(unix)] // TODO(bartlomieju): #[allow(clippy::undocumented_unsafe_blocks)] -- cgit v1.2.3