Skip to content

Commit

Permalink
fix: call SWAT executable file in unix OS platform
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenta committed Feb 27, 2024
1 parent 440b1f3 commit b3aaf2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/runSWATpar.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ runSWATSequential <- function(coreNumber,
exeFile <- strsplit(swatExe, split="\\\\")[[1]]
if(!file.exists(exeFile[length(exeFile)])) file.copy(swatExe, toDir)

system(trimws(exeFile[length(exeFile)]))
if(.Platform$OS.type == "unix") {
system(paste0("./", trimws(exeFile[length(exeFile)])))
} else {
system(trimws(exeFile[length(exeFile)]))
}

# Check first run
if ((nrow(subParameterSet) > 1) & (i > 1)){
Expand Down

0 comments on commit b3aaf2d

Please sign in to comment.