fix(cli): Check permissions for Deno.emit() (#9139)

This commit is contained in:
Nayeem Rahman 2021-01-17 21:58:23 +00:00 committed by GitHub
parent 2b5b93158c
commit 81d73f2987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 29 deletions

View file

@ -0,0 +1 @@
await Deno.emit(new URL("001_hello.js", import.meta.url).href);

View file

@ -0,0 +1,2 @@
[WILDCARD]error: Uncaught (in promise) PermissionDenied: read access to "[WILDCARD]001_hello.js", run again with the --allow-read flag
[WILDCARD]

View file

@ -2656,6 +2656,12 @@ itest!(_079_location_authentication {
output: "079_location_authentication.ts.out",
});
itest!(_080_deno_emit_permissions {
args: "run --unstable 080_deno_emit_permissions.ts",
output: "080_deno_emit_permissions.ts.out",
exit_code: 1,
});
itest!(js_import_detect {
args: "run --quiet --reload js_import_detect.ts",
output: "js_import_detect.ts.out",