Skip to contents

Safely check if any version of the tool is installed.

Usage

sn_is_tool_installed(tool, version = NULL, base_dir = NULL)

Arguments

tool

Tool object

version

Character. Specific version to check (optional)

base_dir

Character. Base directory for installations (optional, will use default toolbox if not provided)

Value

Logical. Installation status

Examples

if (FALSE) { # \dontrun{
# Check if any version is installed
if (sn_is_tool_installed(tool)) {
  # At least one version is ready to use
}

# Check if specific version is installed
if (sn_is_tool_installed(tool, "1.22")) {
  # Version 1.22 is installed
}
} # }