This will set an environment variable in a way that makes it available to the following steps, compared to using Sys.setenv(), which would only make an envvar available in the current step.

octo_set_envvar(value, name, set = TRUE, delim = "EOF")

Arguments

value

Value of the envvar, coercible to string. Can be a multiline string or character vector of length > 1, each element will be interpreted as one line.

name

Name of the envvar.

set

Should the envvar also be set in this step?

delim

Delimiter used for multiline strings. No need to change this unless your string contains 'EOF'.

Examples

if (FALSE) {
val <- c("Some content", "that spans", "multiple lines")
octo_set_envvar(val, "multi")
octo_set_envvar(2342, "pid")
}