summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/process.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/process.ts')
-rw-r--r--ext/node/polyfills/process.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts
index b676e87d7..444dc12e4 100644
--- a/ext/node/polyfills/process.ts
+++ b/ext/node/polyfills/process.ts
@@ -13,7 +13,8 @@ import {
} from "ext:deno_node/internal/errors.ts";
import { getOptionValue } from "ext:deno_node/internal/options.ts";
import { assert } from "ext:deno_node/_util/asserts.ts";
-import { fromFileUrl, join } from "ext:deno_node/path.ts";
+import { join } from "ext:deno_node/path.ts";
+import { pathFromURL } from "ext:deno_web/00_infra.js";
import {
arch as arch_,
chdir,
@@ -705,7 +706,7 @@ internals.__bootstrapNodeProcess = function (
Object.defineProperty(argv, "1", {
get: () => {
if (Deno.mainModule.startsWith("file:")) {
- return fromFileUrl(Deno.mainModule);
+ return pathFromURL(new URL(Deno.mainModule));
} else {
return join(Deno.cwd(), "$deno$node.js");
}