Skip to content

pre/post-render scripts should work without a directory specifier #13424

@mcanouil

Description

@mcanouil

Bug description

Pre/post-render scripts broken leading to a crash:

ERROR: Error executing 'nothing.sh': Failed to spawn 'nothing.sh': entity not found

Stack trace:
    at execProcess (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/process.ts:203:11)
    at runScripts (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/project.ts:968:28)
    at runPreRender (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/project.ts:912:9)
    at renderProject (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/project.ts:331:11)
    at eventLoopTick (ext:core/01_core.js:179:7)
    at async Command.actionHandler (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/cmd.ts:251:26)
    at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
    at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14)
    at async quarto (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/quarto.ts:193:5)
    at async file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/quarto.ts:225:5

Steps to reproduce

quarto create project default issueXXXX issueXXXX --no-open
cd issueXXXX
echo '#!/usr/bin/env bash' > nothing.sh
chmod +x nothing.sh
echo -e "project:\n  pre-render:\n    - nothing.sh" > _quarto.yml
quarto render

Quarto check output

quarto 99.9.9
[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.87.0: OK
      NOTE: Deno version 2.4.5 does not strictly match 2.3.1 and strict checking is enabled. Please use 2.3.1.
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 304399335b840dfa5b4e84a2875d25ebd7ed0322
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2025.08.02
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
      Version: 2025

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
      Source: QUARTO_CHROMIUM

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.7
      Path: /opt/homebrew/opt/python@3.13/bin/python3.13
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

      There is an unactivated Python environment in .venv. Did you forget to activate it?

(-) Checking R installation...........ℹ R version 4.5.1 (2025-06-13)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
      Version: 4.5.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/mcanouil/Projects/quarto-dev/quarto-playground/renv/library/macos/R-4.5/aarch64-apple-darwin20
        - /Users/mcanouil/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
      knitr: 1.50
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmetadataIssues involving metadata resolution in quarto-cli cells, documents, and projects.project-scripts

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions