Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarto: project paths having spaces are not correctly inspected #1037

Closed
aronatkins opened this issue Jan 25, 2024 · 3 comments · Fixed by #1038
Closed

quarto: project paths having spaces are not correctly inspected #1037

aronatkins opened this issue Jan 25, 2024 · 3 comments · Fixed by #1038
Assignees

Comments

@aronatkins
Copy link
Contributor

Given a project where some part of the path contains spaces:

# Create a project having spaces.
usethis::create_project("~/Desktop/quarto space path")

# In that new project:
writeLines(c(
    "---",
    "title: space is fun",
    "---"
), "index.qmd")
rsconnect:::quartoInspect(getwd(), "index.qmd") 
# => NULL

The quartoInspect call should return an object describing the Quarto content rather than NULL.

Internally, this is because:

system2(rsconnect:::quarto_path(), c("inspect", file.path(getwd(), "index.qmd")), stdout = TRUE, stderr = TRUE)
[1] "\033[91mERROR: Too many arguments: space path/index.qmd"                          
[2] ""                                                                                 
[3] "Stack trace:"                                                                     
[4] "    at Command.parseArguments (file:///Applications/quarto/bin/quarto.js:8268:27)"
[5] "    at Command.parseCommand (file:///Applications/quarto/bin/quarto.js:7987:31)"  
[6] "    at eventLoopTick (ext:core/01_core.js:183:11)"                                
[7] "    at async quarto (file:///Applications/quarto/bin/quarto.js:114968:5)"         
[8] "    at async file:///Applications/quarto/bin/quarto.js:114986:9\033[39m"          
attr(,"status")
[1] 1
Warning message:
In system2(rsconnect:::quarto_path(), c("inspect", file.path(getwd(),  :
  running command ''/usr/local/bin/quarto' inspect /Users/aron/Desktop/quarto space path/index.qmd 2>&1' had status 1
@aronatkins aronatkins self-assigned this Jan 25, 2024
@aronatkins
Copy link
Contributor Author

Would have been good to have had #1032, though this is a different root problem.

@aronatkins
Copy link
Contributor Author

Note: Customer ticket 99719

@ChaitaC
Copy link

ChaitaC commented Jan 30, 2024

Verified with the latest rsconnect dev version

GithubRepo: rsconnect
GithubUsername: rstudio
GithubRef: HEAD
GithubSHA1: 2e59f9d56651189487e195a8140baebe580d3476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants