summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fs/ops.rs9
1 files changed, 8 insertions, 1 deletions
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)