diff options
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 2 | ||||
-rw-r--r-- | runtime/js/30_fs.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 3db07ba65..2032757bb 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -248,7 +248,7 @@ declare namespace Deno { * * Requires --allow-read. */ - export function chdir(directory: string): void; + export function chdir(directory: string | URL): void; /** * Return a string representing the current working directory. diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js index 84e1c6819..913158a34 100644 --- a/runtime/js/30_fs.js +++ b/runtime/js/30_fs.js @@ -58,7 +58,7 @@ } function chdir(directory) { - core.opSync("op_chdir", directory); + core.opSync("op_chdir", pathFromURL(directory)); } function makeTempDirSync(options = {}) { |