Setup the context for the command
Usage
cmd_wd(command, wd = NULL)
cmd_envvar(command, ..., action = "replace", sep = NULL)
cmd_envpath(command, ..., action = "prefix", name = "PATH")
cmd_condaenv(command, ..., root = NULL, action = "prefix")
Arguments
- command
A
command
object.- wd
A string or
NULL
define the working directory of the command.- ...
<dynamic dots>:
cmd_envvar
: Named character define the environment variables.cmd_envpath
: Unnamed character to define thePATH
-like environment variablesname
.cmd_condaenv
: Unnamed character to specify the name of conda environment.
- action
Should the new values
"replace"
,"prefix"
or"suffix"
existing environment variables?- sep
A string to separate new and old value when
action
is"prefix"
or"suffix"
. By default," "
will be used.- name
A string define the PATH environment variable name. You can use this to define other
PATH
-like environment variable such asPYTHONPATH
.- root
A string specifying the path to the conda root prefix. If not provided, the function searches for the root in the following order:
the option
blit.conda.root
.the environment variable
BLIT_CONDA_ROOT
.the root prefix of
appmamba()
.
Value
cmd_wd
: Thecommand
object itself, with working directory updated.
cmd_envvar
: Thecommand
object itself, with running environment variable updated.
cmd_envpath
: Thecommand
object itself, with running environment variable specified inname
updated.
cmd_condaenv
: Thecommand
object itself, with running environment variablePATH
updated.