@@ -296,10 +296,8 @@ export async function renderProject(
296
296
await ensureGitignore ( context . dir ) ;
297
297
298
298
// determine whether pre and post render steps should show progress
299
- const progress = (
300
- ! ! projectRenderConfig . options . progress ||
301
- ( projectRenderConfig . filesToRender . length > 1 )
302
- ) && ! projectRenderConfig . options . flags ?. quiet ;
299
+ const progress = ! ! projectRenderConfig . options . progress ||
300
+ ( projectRenderConfig . filesToRender . length > 1 ) ;
303
301
304
302
// if there is an output dir then remove it if clean is specified
305
303
if (
@@ -330,7 +328,6 @@ export async function renderProject(
330
328
...( projectRenderConfig . behavior . renderAll
331
329
? { QUARTO_PROJECT_RENDER_ALL : "1" }
332
330
: { } ) ,
333
- "QUARTO_PROJECT_SCRIPT_PROGRESS" : progress ? "1" : "0" ,
334
331
} ;
335
332
336
333
// 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