Skip to content

Commit 8b39db5

Browse files
committed
Set Deno.execPath() inside Windows PATH so that deno task can find deno
1 parent 9c4bf64 commit 8b39db5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/webui/quarto-preview/build.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { dirname } from "node:path";
2+
13
// ensure this is treated as a module
24
export {};
35

@@ -20,6 +22,13 @@ const run = async (args: string[], quiet = true) => {
2022
console.log(`Running: ${Deno.execPath()} ${args.join(" ")}`);
2123
const command = new Deno.Command(Deno.execPath(), {
2224
args,
25+
env: Deno.build.os === "windows"
26+
? {
27+
PATH: `${dirname(Deno.execPath())}${
28+
Deno.env.get("PATH") ? `;${Deno.env.get("PATH")}` : ""
29+
}`,
30+
}
31+
: undefined,
2332
});
2433
const output = await command.output();
2534
if (output.success || quiet) {

0 commit comments

Comments
 (0)