Skip to content

Commit

Permalink
Replace hasArg with missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanzomorrodi committed Nov 17, 2024
1 parent 7202272 commit eb47a63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions R/connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#'
#' @export
sas_connect <- function(config) {
if (hasArg(config)) {
.pkgenv$session <- .pkgenv$saspy$SASsession(config)
} else {
if (missing(config)) {
.pkgenv$session <- .pkgenv$saspy$SASsession()
} else {
.pkgenv$session <- .pkgenv$saspy$SASsession(config)
}
}

Expand Down
2 changes: 1 addition & 1 deletion R/run.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sas_run_file <- function(input_path, output_path, overwrite = FALSE) {

input <- read_file(input_path)

if (!hasArg(output_path)) {
if (missing(output_path)) {
return(sas_run_string(input))
}

Expand Down
2 changes: 1 addition & 1 deletion R/use_quarto.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#'
#' @export
sas_use_quarto <- function(path) {
if (!hasArg(path)) {
if (missing(path)) {
path <- "."
} else if (!dir.exists(path)) {
stop("Specified directory does not exist")
Expand Down

0 comments on commit eb47a63

Please sign in to comment.