Skip to content

Commit accad88

Browse files
committed
make it clearer that showing script progress consider also the --quiet option
1 parent 99f3e0d commit accad88

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/command/render/project.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ export async function renderProject(
296296
await ensureGitignore(context.dir);
297297

298298
// determine whether pre and post render steps should show progress
299-
const progress = !!projectRenderConfig.options.progress ||
300-
(projectRenderConfig.filesToRender.length > 1);
299+
const progress = (
300+
!!projectRenderConfig.options.progress ||
301+
(projectRenderConfig.filesToRender.length > 1)
302+
) && !projectRenderConfig.options.flags?.quiet;
301303

302304
// if there is an output dir then remove it if clean is specified
303305
if (
@@ -328,8 +330,7 @@ export async function renderProject(
328330
...(projectRenderConfig.behavior.renderAll
329331
? { QUARTO_PROJECT_RENDER_ALL: "1" }
330332
: {}),
331-
"QUARTO_PROJECT_SCRIPT_PROGRESS":
332-
progress && !projectRenderConfig.options.flags?.quiet ? "1" : "0",
333+
"QUARTO_PROJECT_SCRIPT_PROGRESS": progress ? "1" : "0",
333334
};
334335

335336
// run pre-render step if we are rendering all files
@@ -963,7 +964,7 @@ async function runScripts(
963964
const args = parseShellRunCommand(scripts[i]);
964965
const script = args[0];
965966

966-
if (progress && !quiet) {
967+
if (progress) {
967968
info(colors.bold(colors.blue(`Running script '${script}'`)));
968969
}
969970

0 commit comments

Comments
 (0)