diff options
Diffstat (limited to 'std/node')
-rw-r--r-- | std/node/module.ts | 4 | ||||
-rw-r--r-- | std/node/process.ts | 2 | ||||
-rw-r--r-- | std/node/process_test.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/std/node/module.ts b/std/node/module.ts index b7a0107d0..9203764f0 100644 --- a/std/node/module.ts +++ b/std/node/module.ts @@ -534,8 +534,8 @@ class Module { } static _initPaths(): void { - const homeDir = Deno.env("HOME"); - const nodePath = Deno.env("NODE_PATH"); + const homeDir = Deno.env.get("HOME"); + const nodePath = Deno.env.get("NODE_PATH"); // Removed $PREFIX/bin/node case diff --git a/std/node/process.ts b/std/node/process.ts index 310a7e814..f90e1eada 100644 --- a/std/node/process.ts +++ b/std/node/process.ts @@ -30,7 +30,7 @@ export const process = { on, get env(): { [index: string]: string } { // using getter to avoid --allow-env unless it's used - return Deno.env(); + return Deno.env.toObject(); }, get argv(): string[] { // Deno.execPath() also requires --allow-env diff --git a/std/node/process_test.ts b/std/node/process_test.ts index b9d5388ea..3afaa4cdf 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -3,7 +3,7 @@ import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; import { process } from "./process.ts"; // NOTE: Deno.execPath() (and thus process.argv) currently requires --allow-env -// (Also Deno.env() (and process.env) requires --allow-env but it's more obvious) +// (Also Deno.env.toObject() (and process.env) requires --allow-env but it's more obvious) test({ name: "process.cwd and process.chdir success", |