Skip to content

Commit 50dc383

Browse files
committed
Fix reference-R runner path detection
1 parent de9a7bf commit 50dc383

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎Great S4 massacre/tests/run_compliance.R‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ full_args <- commandArgs(trailingOnly = FALSE)
22
file_arg <- grep("^--file=", full_args, value = TRUE)
33

44
if (length(file_arg) == 1L) {
5-
script_path <- normalizePath(sub("^--file=", "", file_arg), mustWork = TRUE)
6-
massacre_root <- dirname(dirname(script_path))
5+
script_path <- sub("^--file=", "", file_arg)
6+
if (file.exists(script_path)) {
7+
massacre_root <- dirname(dirname(normalizePath(script_path, mustWork = TRUE)))
8+
} else {
9+
massacre_root <- normalizePath("Great S4 massacre", mustWork = TRUE)
10+
}
711
} else {
812
massacre_root <- normalizePath("Great S4 massacre", mustWork = TRUE)
913
}

0 commit comments

Comments
 (0)