R/is_singularity_apptainer.R

Defines functions is_singularity_apptainer

is_singularity_apptainer <- function() {
  out <- tryCatch(
    processx::run("singularity", "--help", error_on_status = FALSE, stderr_callback = print_processx, timeout = 2),
    error = function(e) {
      list(status = 1, message = e$message)
    }
  )

  grepl("apptainer", out$stdout)
}

Try the babelwhale package in your browser

Any scripts or data that you put into this service are public.

babelwhale documentation built on July 26, 2023, 5:24 p.m.