Skip to content

Commit 6ab8c2e

Browse files
committed
scope execProcess behavior change to quarto run *.ts
1 parent 0ee629b commit 6ab8c2e

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

src/core/process.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function execProcess(
2121
stdin?: string,
2222
mergeOutput?: "stderr>stdout" | "stdout>stderr",
2323
stderrFilter?: (output: string) => string,
24+
respectStreams?: boolean,
2425
): Promise<ProcessResult> {
2526
// define process
2627
try {
@@ -104,7 +105,7 @@ export async function execProcess(
104105
stdoutText = await processOutput(
105106
iterateReader(process.stdout),
106107
options.stdout,
107-
"stdout",
108+
respectStreams ? "stdout" : undefined,
108109
);
109110
process.stdout.close();
110111
}
@@ -116,7 +117,7 @@ export async function execProcess(
116117
stderrText = await processOutput(
117118
iterator,
118119
options.stderr,
119-
"stderr",
120+
respectStreams ? "stderr" : undefined,
120121
);
121122
process.stderr.close();
122123
}

src/core/run/deno.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,26 @@ export const denoRunHandler: RunHandler = {
3535
};
3636
const importMap = resourcePath(join("deno_std", "import_map.json"));
3737

38-
return await execProcess({
39-
cmd: [
40-
toolsPath("deno"),
41-
"run",
42-
"--import-map",
43-
importMap,
44-
"--cached-only",
45-
"--allow-all",
46-
"--unstable",
47-
script,
48-
...args,
49-
],
50-
...options,
51-
}, stdin);
38+
return await execProcess(
39+
{
40+
cmd: [
41+
toolsPath("deno"),
42+
"run",
43+
"--import-map",
44+
importMap,
45+
"--cached-only",
46+
"--allow-all",
47+
"--unstable",
48+
script,
49+
...args,
50+
],
51+
...options,
52+
},
53+
stdin,
54+
undefined,
55+
undefined,
56+
true,
57+
);
5258
},
5359
};
5460

0 commit comments

Comments
 (0)