View source: R/read-bbi-path.R
read_bbi_path | R Documentation |
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.
read_bbi_path(
path = Sys.getenv("BBI_EXE_PATH", NA),
default = BBI_DEFAULT_PATH
)
path |
path to the bbi executable |
default |
a default path if |
path
if not NA
, else default
read_bbi_path()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.