From 4f49f703c10afcde7155baac2b494fa6670c0115 Mon Sep 17 00:00:00 2001 From: Yazan AbdAl-Rahman Date: Tue, 20 Aug 2024 04:20:06 +0300 Subject: fix(cli): update permission prompt message for compiled binaries (#24081) Co-authored-by: David Sherret --- ext/fs/ops.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext/fs/ops.rs') diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index 57b0e0b9e..e8a074be5 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -67,7 +67,14 @@ fn map_permission_error( } else { (path.as_str(), "") }; - custom_error("PermissionDenied", format!("Requires {err} access to {path}{truncated}, run again with the --allow-{err} flag")) + let msg = if deno_permissions::is_standalone() { + format!( + "Requires {err} access to {path}{truncated}, specify the required permissions during compilation using `deno compile --allow-{err}`") + } else { + format!( + "Requires {err} access to {path}{truncated}, run again with the --allow-{err} flag") + }; + custom_error("PermissionDenied", msg) } err => Err::<(), _>(err) .context_path(operation, path) -- cgit v1.2.3