read_bbi_path: Set the path to the bbi executable

View source: R/read-bbi-path.R

read_bbi_pathR Documentation

Set the path to the bbi executable

Description

withr::with_options() is used throughout package tests to set the path to the bbi executable. The test suite will fail if this path does not exist, which limits flexibility across environments, e.g., in continuous integration. Any solution that decouples the with_options() pattern from a particular default path must work with devtools::check(), which runs in a separate process. We can inject environment variables into check(), so the default behavior is to rely on such a variable to set the path, falling back to a default path if unset.

Usage

read_bbi_path(
  path = Sys.getenv("BBI_EXE_PATH", NA),
  default = BBI_DEFAULT_PATH
)

Arguments

path

path to the bbi executable

default

a default path if path is NA

Value

path if not NA, else default

Examples

read_bbi_path()

metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.