Does not work inside `source`
Opened this issue · 0 comments
bersbersbers commented
bug1.R
:
x <- file.path(funr::get_script_path(), "bug2.R") # works
source(x)
source(file.path(funr::get_script_path(), "bug2.R")) # fails
bug2.R
:
print("Hi")
Rscript bug1.R
:
[1] "Hi"
Error in path.expand(path) : invalid 'path' argument
Calls: source ... file.path -> <Anonymous> -> normalizePath -> path.expand
Execution halted