Skip to content

Commit c0e067c

Browse files
committed
monkey-patch Deno.copy to support dependencies that rely on Deno 1 Deno.copy
1 parent 91ce87d commit c0e067c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/deno/monkey-patch.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { debug } from "../../deno_ral/log.ts";
88
import { normalizePath } from "../path.ts";
9-
import { getStack } from "./debug.ts";
9+
import { copy } from "io/copy";
1010

1111
// Windows UNC paths can be mishandled by realPathSync
1212
// (see https://github.com/quarto-dev/quarto-vscode/issues/67)
@@ -15,6 +15,11 @@ import { getStack } from "./debug.ts";
1515
// resolution, and certainly not on windows that has no symlinks!)
1616
Deno.realPathSync = normalizePath;
1717

18+
// some of our dependencies use Deno.copy and have not been ported to Deno 2
19+
//
20+
// deno-lint-ignore no-explicit-any
21+
(Deno as any).copy = copy;
22+
1823
// 2023-02-14: We're seeing a rare failure in Deno.makeTempFile{,Sync} with FileExists, so we're going to try
1924
// a few times to create the file. If it fails, we'll log the error and try again.
2025
// If it fails 5 times, we'll throw the error.

0 commit comments

Comments
 (0)