Skip to content

Commit 45c8580

Browse files
committed
Use one env var per argument QUIET VS PROGRESS
1 parent 775b4c2 commit 45c8580

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/command/render/project.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -968,13 +968,16 @@ async function runScripts(
968968
}
969969
if (!env) throw new Error("should never get here");
970970

971+
// Pass some argument as environment
972+
env["QUARTO_PROJECT_SCRIPT_PROGRESS"] = progress ? "1" : "0";
973+
env["QUARTO_PROJECT_SCRIPT_QUIET"] = quiet ? "1" : "0";
974+
971975
for (let i = 0; i < scripts.length; i++) {
972976
const args = parseShellRunCommand(scripts[i]);
973977
const script = args[0];
974978

975979
if (progress && !quiet) {
976980
info(colors.bold(colors.blue(`Running script '${script}'`)));
977-
env["QUARTO_PROJECT_SCRIPT_PROGRESS"] = "1";
978981
}
979982

980983
const handler = handlerForScript(script) ?? {

0 commit comments

Comments
 (0)