@@ -298,10 +298,8 @@ export async function renderProject(
298
298
await ensureGitignore ( context . dir ) ;
299
299
300
300
// determine whether pre and post render steps should show progress
301
- const progress = (
302
- ! ! projectRenderConfig . options . progress ||
303
- ( projectRenderConfig . filesToRender . length > 1 )
304
- ) && ! projectRenderConfig . options . flags ?. quiet ;
301
+ const progress = ! ! projectRenderConfig . options . progress ||
302
+ ( projectRenderConfig . filesToRender . length > 1 ) ;
305
303
306
304
// if there is an output dir then remove it if clean is specified
307
305
if (
@@ -332,7 +330,6 @@ export async function renderProject(
332
330
...( projectRenderConfig . behavior . renderAll
333
331
? { QUARTO_PROJECT_RENDER_ALL : "1" }
334
332
: { } ) ,
335
- "QUARTO_PROJECT_SCRIPT_PROGRESS" : progress ? "1" : "0" ,
336
333
} ;
337
334
338
335
// run pre-render step if we are rendering all files
@@ -960,24 +957,27 @@ async function runScripts(
960
957
quiet : boolean ,
961
958
env ?: { [ key : string ] : string } ,
962
959
) {
960
+ // initialize the environment if needed
961
+ if ( env ) {
962
+ env = {
963
+ ...env ,
964
+ } ;
965
+ } else {
966
+ env = { } ;
967
+ }
968
+ if ( ! env ) throw new Error ( "should never get here" ) ;
969
+
963
970
for ( let i = 0 ; i < scripts . length ; i ++ ) {
964
971
const args = parseShellRunCommand ( scripts [ i ] ) ;
965
972
const script = args [ 0 ] ;
966
973
967
- if ( progress ) {
974
+ if ( progress && ! quiet ) {
968
975
info ( colors . bold ( colors . blue ( `Running script '${ script } '` ) ) ) ;
976
+ env [ "QUARTO_PROJECT_SCRIPT_PROGRESS" ] = "1" ;
969
977
}
970
978
971
979
const handler = handlerForScript ( script ) ;
972
980
if ( handler ) {
973
- if ( env ) {
974
- env = {
975
- ...env ,
976
- } ;
977
- } else {
978
- env = { } ;
979
- }
980
- if ( ! env ) throw new Error ( "should never get here" ) ;
981
981
const input = Deno . env . get ( "QUARTO_USE_FILE_FOR_PROJECT_INPUT_FILES" ) ;
982
982
const output = Deno . env . get ( "QUARTO_USE_FILE_FOR_PROJECT_OUTPUT_FILES" ) ;
983
983
if ( input ) {
0 commit comments