1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

feat(cli): support URL overload for Deno.chdir (#10793)

This commit is contained in:
Casper Beyer 2021-06-03 22:32:18 +08:00 committed by GitHub
parent ece56d9935
commit 55e962b688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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.

View file

@ -58,7 +58,7 @@
}
function chdir(directory) {
core.opSync("op_chdir", directory);
core.opSync("op_chdir", pathFromURL(directory));
}
function makeTempDirSync(options = {}) {