Skip to content

Commit

Permalink
fix: user supplied 'file'-argument works correctly
Browse files Browse the repository at this point in the history
- use path constructed from 'file' argument instead of hard code "dev/run_dev.R"
- improve error message on failure

Refs: ThinkR-open#886
  • Loading branch information
ilyaZar committed Jun 2, 2023
1 parent 5acafc8 commit d08bdc9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/run_dev.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ run_dev <- function(

# Stop if it doesn't exists
if (file.exists(try_dev)) {
run_dev_lines <- readLines(
"dev/run_dev.R"
)
run_dev_lines <- readLines(try_dev)
} else {
stop(
"Unable to locate dev file"
"Unable to locate run_dev-file passed via the 'file' argument."
)
}

Expand Down

0 comments on commit d08bdc9

Please sign in to comment.