mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
feat(cli): support URL overload for Deno.chdir
(#10793)
This commit is contained in:
parent
ece56d9935
commit
55e962b688
2 changed files with 2 additions and 2 deletions
2
cli/dts/lib.deno.ns.d.ts
vendored
2
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -248,7 +248,7 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* Requires --allow-read.
|
* Requires --allow-read.
|
||||||
*/
|
*/
|
||||||
export function chdir(directory: string): void;
|
export function chdir(directory: string | URL): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a string representing the current working directory.
|
* Return a string representing the current working directory.
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function chdir(directory) {
|
function chdir(directory) {
|
||||||
core.opSync("op_chdir", directory);
|
core.opSync("op_chdir", pathFromURL(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeTempDirSync(options = {}) {
|
function makeTempDirSync(options = {}) {
|
||||||
|
|
Loading…
Reference in a new issue