Skip to content

Commit 1a0a97d

Browse files
committed
Fix non-WSL asserts
1 parent 620458f commit 1a0a97d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

R/utils.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ wsl_tempdir <- function() {
596596
# network path as legitimate, and will always error. To avoid this we create a
597597
# new checking functions with WSL handling, and then pass these to
598598
# checkmate::makeAssertionFunction to replicate the existing assertion functionality
599-
check_dir_exists <- function(dir, access = NULL) {
599+
check_dir_exists <- function(dir, access = "") {
600600
if (os_is_wsl()) {
601601
if (!checkmate::qtest(dir, "S+")) {
602602
return("No directory provided.")
@@ -612,7 +612,7 @@ check_dir_exists <- function(dir, access = NULL) {
612612
}
613613
}
614614

615-
check_file_exists <- function(files, access = NULL, ...) {
615+
check_file_exists <- function(files, access = "", ...) {
616616
if (os_is_wsl()) {
617617
if (!checkmate::qtest(files, "S+")) {
618618
return("No file provided.")
@@ -628,7 +628,7 @@ check_file_exists <- function(files, access = NULL, ...) {
628628
}
629629
}
630630

631-
.wsl_check_exists <- function(path, is_dir = TRUE, access = NULL) {
631+
.wsl_check_exists <- function(path, is_dir = TRUE, access = "") {
632632
path_check <- processx::run(
633633
command = "wsl",
634634
args = c("ls", "-la", wsl_safe_path(path)),

0 commit comments

Comments
 (0)