summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-11-12 17:14:19 -0500
committerGitHub <noreply@github.com>2024-11-12 17:14:19 -0500
commit119910f3395cf073b7acf6a31c207daf597917f1 (patch)
treef7f6ba942feaa0b0c5f0f41dbed384da84223f17 /runtime
parent01f3451869f56dc0651d8cd30bf8540aeb462c04 (diff)
fix(permissions): say to use --allow-run instead of --allow-all (#26842)
For https://github.com/denoland/deno/issues/26839
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ops/process.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs
index de3141f1f..ee2f660dc 100644
--- a/runtime/ops/process.rs
+++ b/runtime/ops/process.rs
@@ -756,14 +756,17 @@ fn check_run_permission(
if !env_var_names.is_empty() {
// we don't allow users to launch subprocesses with any LD_ or DYLD_*
// env vars set because this allows executing code (ex. LD_PRELOAD)
- return Err(CheckRunPermissionError::Other(deno_core::error::custom_error(
- "NotCapable",
- format!(
- "Requires --allow-all permissions to spawn subprocess with {} environment variable{}.",
- env_var_names.join(", "),
- if env_var_names.len() != 1 { "s" } else { "" }
- )
- )));
+ return Err(CheckRunPermissionError::Other(
+ deno_core::error::custom_error(
+ "NotCapable",
+ format!(
+ "Requires --allow-run permissions to spawn subprocess with {0} environment variable{1}. Alternatively, spawn with {2} environment variable{1} unset.",
+ env_var_names.join(", "),
+ if env_var_names.len() != 1 { "s" } else { "" },
+ if env_var_names.len() != 1 { "these" } else { "the" }
+ ),
+ ),
+ ));
}
permissions.check_run(cmd, api_name)?;
}