Work with absolute paths#41
Conversation
| ast_path <- tempfile() | ||
| on.exit(unlink(ast_path)) | ||
|
|
||
| in_path <- fs::path_abs(in_path) |
There was a problem hiding this comment.
Is there a reason not to use normalizePath() here? I'd prefer to keep the dependencies lighter.
There was a problem hiding this comment.
The file must exist, this is generally not true for out_path:
normalizePath("bogus")
#> Warning in normalizePath("bogus"): path[1]="bogus": No such file or directory
#> [1] "bogus"Created on 2020-09-03 by the reprex package (v0.3.0)
Same with mustWork = FALSE sans warning.
We can work around if you think it's worth it, or copy code from fs.
There was a problem hiding this comment.
I guess the other option is to require/document that the user supply absolute paths? That might be easier given that I expect relatively few people to be calling this function.
|
Works now. Do we need a test? |
|
Yeah, a test would be useful I think. |
|
Done. |
3206600 to
30a9ab7
Compare
|
Resolved conflicts. |
|
I bumped into this issue today and, although rstudio/rmarkdown#1889 has been closed, I suspect it is not truly fixed. Anecdotally, it feels like I am having trouble using |
Work around rstudio/rmarkdown#1889.