You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RStudio Edition : Desktop
RStudio Version : 2022.07.2+576 and 2023.12.0+369
OS Version : MacOS 14 and Windows 11
R Version : 4.3.2
Steps to reproduce the problem
Set the variable RSTUDIO_QUARTO in .Renviron to point to a version of Quarto that isn't in PATH nor bundled with the RStudio instance being used.
Describe the problem in detail
In some case, RSTUDIO_QUARTO is ignored.
On one Mac:
# this works
RSTUDIO_QUARTO=/Users/sharon/Documents/quarto/quarto-1.4.534-macos/bin/quarto
# this doesn't work
RSTUDIO_QUARTO=/Users/sharon/Desktop/quarto/quarto-1.4.534-macos/bin/quarto
On another Mac:
# This works
> Sys.getenv("RSTUDIO_QUARTO")
[1] "/Applications/RStudio_Previous/RStudio-2022.07.2-576.app/Contents/MacOS/quarto/bin/quarto"
> quarto::quarto_path()
[1] "/Applications/RStudio_Previous/RStudio-2022.07.2-576.app/Contents/MacOS/quarto/bin/quarto"
> quarto::quarto_version()
[1] '1.1.189'
# This works
> Sys.getenv("RSTUDIO_QUARTO")
[1] "/Users/ronblum/Desktop/quarto/bin/quarto"
> quarto::quarto_path()
[1] "/Users/ronblum/Desktop/quarto/bin/quarto"
> quarto::quarto_version()
[1] '1.2.475'
# This doesn't work
> Sys.getenv("RSTUDIO_QUARTO")
[1] "/Users/ronblum/Applications/quarto/bin/quarto"
> quarto::quarto_path()
[1] "/Applications/quarto/bin/quarto"
> quarto::quarto_version()
[1] '1.4.534'
Describe the behavior you expected
RSTUDIO_QUARTO should always take precedence over whatever's in PATH or bundled.
That's a good question. In my case, I downloaded the .tar.gz. Duplicating from the description, this is what did and didn't work for me:
# this works
RSTUDIO_QUARTO=/Users/sharon/Documents/quarto/quarto-1.4.534-macos/bin/quarto
# this doesn't work
RSTUDIO_QUARTO=/Users/sharon/Desktop/quarto/quarto-1.4.534-macos/bin/quarto
This appears to be happening due to the Python path activation issue which puts /usr/local/bin the front of the path if Tools -> Global Options -> Python -> Automatically activate project-level Python environments is checked.
FWIW I'm not sure if the issue @ronblum was seeing matches what @sharon-wang was seeing. @ronblum's issue is that there are two "things" trying to put Quarto on the PATH:
The detection of RSTUDIO_QUARTO,
The detection of Python.
If Python is found at /usr/local/bin on the PATH, and quarto is also installed on the PATH there, then that ends up taking precedence over the version found in RSTUDIO_QUARTO.
Activity
kevinushey commentedon Jan 4, 2024
I wasn't able to reproduce locally. Can you share any other details?
kevinushey commentedon Jan 4, 2024
Does it depend on whether you've installed the
.tar.gzversus the package installer?sharon-wang commentedon Jan 4, 2024
That's a good question. In my case, I downloaded the
.tar.gz. Duplicating from the description, this is what did and didn't work for me:ronblum commentedon Jan 8, 2024
This appears to be happening due to the Python path activation issue which puts /usr/local/bin the front of the path if
Tools -> Global Options -> Python -> Automatically activate project-level Python environments is checked.
kevinushey commentedon Jan 9, 2024
FWIW I'm not sure if the issue @ronblum was seeing matches what @sharon-wang was seeing. @ronblum's issue is that there are two "things" trying to put Quarto on the PATH:
RSTUDIO_QUARTO,If Python is found at
/usr/local/binon the PATH, and quarto is also installed on the PATH there, then that ends up taking precedence over the version found inRSTUDIO_QUARTO.