I am unable to execute quarto commands from the RStudio terminal. This discussion was previously opened here but not resolved.

I am on Windows 10, and I am using R 4.2.0, RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22), and Quarto 1.0.38. When I installed Quarto, I selected the option to install for all users as I have administrative privileges. My installation is location in program files, as seen in the image here.

In the terminal:

  • the result of quarto --version is bash: quarto: command not found
  • the result of echo $PATH is
/c/Users/pileggis/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/pileggis/bin:/c/rtools42/x86_64-w64-mingw32.static.posix/bin:/c/rtools42/usr/bin:/c/Program Files/R/R-4.2.0/bin/x64:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files (x86)/Sennheiser/SenncomSDK:/cmd:/c/Program Files/dotnet:/c/Program Files/SASHome/x86/SASFoundation/9.4/core/sasexe:/c/Program Files/SASHome/x86/SASFoundation/9.4/ets/sasexe:/c/Program Files/SASHome/x86/Secure/ccme4:/c/Program Files/Quarto/bin:/c/Users/pileggis/AppData/Local/Microsoft/WindowsApps:/c/Users/pileggis.old/AppData/Local/GitHubDesktop/bin:/c/Users/pileggis/AppData/Roaming/TinyTeX/bin/win32:/c/Program Files/Quarto/bin:/c/Program Files/RStudio/bin/postback:/bin:/c/Program Files/RStudio/bin/msys-ssh-1000-18:/usr/bin/vendor_perl:/usr/bin/core_perl

In the R console, the result of fs::path_real(Sys.which("quarto")) is C:/Program Files/Quarto/bin/quarto.cmd.

Any advice on how to get quarto commands to work would be much appreciated!

Hi!

Can you try:

quarto.exe --help
quarto.cmd --help

Windows shells (Powershell and git bash) can sometimes require naming the executable to pass commands.

Updates:

quarto.exe --help yields bash: quarto.exe: command not found

and quarto.cmd --help yields

Yay!

So because of the flavor of bash/terminal you are using on Windows, you'll need to use the full name of Quarto.

For example, where Quarto docs say:

quarto render file.qmd --to pdf

You would need to do:

quarto.cmd render file.qmd --to pdf
1 Like

I confirm that from the screenshot you shared you are using got for windows terminal probably which is an emulation of bash. In this terminal, .cmd file is not recognized as a executable and so quarto is not found in PATH without the extension.

If you switch to powershell for example, this will work ok.

Thanks @TMock for being on deck with all these questions !