MoTrPAC / MotrpacBicQC

R package for the MoTrPAC community
https://motrpac.github.io/MotrpacBicQC/index.html
MIT License
8 stars 4 forks source link

Make `dl_read_gcp` automatically detect the operating system #213

Closed biodavidjm closed 11 months ago

biodavidjm commented 1 year ago

For dl_read_gcp, instead of having the arguments:

#' @param ignore_std_err (logical) corresponds to ignore.stderr in `cmd` (default `TRUE`)
#' @param ignore_std_out (logical) corresponds to ignore.stdout in `cmd` (default `TRUE`)

Remove those arguments and are a check point that check the operating system and if it is windows, make them false. Something like this:


# Detect the operating system
os_name <- Sys.info()["sysname"]

# Default arguments for Mac
ignore_std_err <- TRUE
ignore_std_out <- TRUE

# Change default arguments if the OS is Windows
if (os_name == "Windows") {
   ignore_std_err <- FALSE
   ignore_std_out <- FALSE
}