Skip to content

Commit

Permalink
nf check_OutDir
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Mar 5, 2024
1 parent a2db709 commit 05163e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/MarkdownReports.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,13 @@ create_set_OutDir <- function(..., setDir = TRUE, verbose = TRUE, newName = NULL
#' @export
check_OutDir <- function() {
# Get the current working directory
current_dir <- getwd()
current_dir <- paste0(getwd(),"/")

# Check if OutDir is defined and if current_dir is not equal to OutDir
if (!exists("OutDir")) {
message("OutDir does not exist; wd is: ", current_dir)
} else {
try(OutDir <- Stringendo::AddTrailingSlashfNonePresent(OutDir), silent = T)
if (current_dir != OutDir) {
# Print both directories as a message if they do not match
print("Directory Mismatch!")
Expand Down

0 comments on commit 05163e1

Please sign in to comment.