Skip to content

Issue: Incorrect environment variable usage in Quarto version check #2627

@rhetor

Description

@rhetor

Problem Description
When running devtools::check(), the function attempts to check Quarto version using this call:
system2("quarto", "-V", stdout = TRUE, env = paste0("TMPDIR=", temp_dir))

This results in an error:
ERROR: Unknown command "TMPDIR=C:/Users/Administrator/AppData/Local/Temp/Rtmp8m27id/file6e845241f5f". Did you mean command "install"?

Root Cause
The env parameter is being misused. The code passes env = paste0("TMPDIR=", temp_dir) which causes the system to interpret "TMPDIR=path" as a command argument to Quarto rather than setting an environment variable.

Expected Behavior
Checking Quarto version should simply be:
system2("quarto", "-V", stdout = TRUE)
The env parameter is unnecessary for a basic version check and causes the command to fail.

Environment

  • R version 4.5.2 (2025-10-31 ucrt)
  • devtools version: 2.4.6
  • Quarto version: 1.8.26
  • OS: Windows 10 x64 (build 19045)

Steps to Reproduce

  • Have Quarto properly installed and in PATH
  • Create an R package with Quarto documentation
  • Run devtools::check()
  • Observe the error with TMPDIR being treated as a Quarto command

Proposed Fix
Remove the unnecessary env parameter from the Quarto version check call, or use proper environment variable setting with c(TMPDIR = temp_dir) if environment variables are truly needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions