summaryrefslogtreecommitdiff
path: root/cli/js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js')
-rw-r--r--cli/js/lib.deno.ns.d.ts2
-rw-r--r--cli/js/tests/os_test.ts9
2 files changed, 7 insertions, 4 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index a05ff9fd6..83dc362ea 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -147,7 +147,7 @@ declare namespace Deno {
*
* console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno"
*
- * Requires `allow-env` permission.
+ * Requires `allow-read` permission.
*/
export function execPath(): string;
diff --git a/cli/js/tests/os_test.ts b/cli/js/tests/os_test.ts
index a44b69e7d..e99002534 100644
--- a/cli/js/tests/os_test.ts
+++ b/cli/js/tests/os_test.ts
@@ -48,7 +48,10 @@ unitTest(function envPermissionDenied2(): void {
// case-insensitive. Case normalization needs be done using the collation
// that Windows uses, rather than naively using String.toLowerCase().
unitTest(
- { ignore: Deno.build.os !== "windows", perms: { env: true, run: true } },
+ {
+ ignore: Deno.build.os !== "windows",
+ perms: { read: true, env: true, run: true },
+ },
async function envCaseInsensitive() {
// Utility function that runs a Deno subprocess with the environment
// specified in `inputEnv`. The subprocess reads the environment variables
@@ -269,11 +272,11 @@ unitTest(function getDirWithoutPermission(): void {
);
});
-unitTest({ perms: { env: true } }, function execPath(): void {
+unitTest({ perms: { read: true } }, function execPath(): void {
assertNotEquals(Deno.execPath(), "");
});
-unitTest({ perms: { env: false } }, function execPathPerm(): void {
+unitTest({ perms: { read: false } }, function execPathPerm(): void {
let caughtError = false;
try {
Deno.execPath();