Skip to contents

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 the PATH-like environment variables name.

  • 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 as PYTHONPATH.

root

A string specifying the path to the conda root prefix. If not provided, the function searches for the root in the following order:

  1. the option blit.conda.root.

  2. the environment variable BLIT_CONDA_ROOT.

  3. the root prefix of appmamba().

Value

  • cmd_wd: The command object itself, with working directory updated.

  • cmd_envvar: The command object itself, with running environment variable updated.

  • cmd_envpath: The command object itself, with running environment variable specified in name updated.

  • cmd_condaenv: The command object itself, with running environment variable PATH updated.

Functions

  • cmd_wd(): define the working directory.

  • cmd_envvar(): define the environment variables.

  • cmd_envpath(): define the PATH-like environment variables.

  • cmd_condaenv(): Set conda-like environment prefix to the PATH environment variables.