Skip to content

quarto inspect and temporary directories #906

Open

Description

@romainfrancois

From rstudio/rstudio#11201 (comment)

With this R code:

dir.create(tf <- tempfile()); 
dir.create(file.path(tf, "sub"))

main <- file.path(tf, "main.qmd")
writeLines("---\ntitle: quarto document\n---\n", main)

sub <- file.path(tf, "sub", "sub.qmd")
writeLines("---\ntitle: quarto document\n---\n", sub)

writeLines('project:\n  title: "test"\n', file.path(tf, "_quarto.yml"))

system(paste0("quarto inspect ", tf, "/main.qmd | grep project"))  
system(paste0("quarto inspect ", tf, "/sub/sub.qmd | grep project"))  

getting:

> system(paste0("quarto inspect ", tf, "/main.qmd | grep project"))  
  "project": "../../../private/tmp/RtmpAMjixD/file1842c7157d908"
> system(paste0("quarto inspect ", tf, "/sub/sub.qmd | grep project"))  
  "project": "../../../../private/tmp/RtmpAMjixD/file1842c7157d908"

In rstudio/rstudio#11201 (comment) I worked around it by by using workingDir but I was wondering if this was an issue.

% quarto --version
0.9.415

Activity

  1. jjallaire commented on May 17, 2022

    @jjallaire
    Collaborator

    It appears as if we don't make any effort to normalize paths from inspect to absolute. I think for now it's best to run this from the workingDir but we will try to improve this to make everything absolute after we release v1.0

  2. romainfrancois commented on May 17, 2022

    @romainfrancois
    Author

    Thanks. I'll stick with the approach in rstudio/rstudio#11201 then.

  3. added this to the Future milestone on Jun 7, 2022
  4. added
    enhancement
    on Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementinspect

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions