Skip to content

Commit

Permalink
Add environment variables for conda/mamba/micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Dec 13, 2024
1 parent e3542d6 commit bb6b2d1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions conda_lock/conda_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,17 +1193,22 @@ def main() -> None:

@main.command("lock", context_settings={"show_default": True})
@click.option(
"--conda", default=None, help="path (or name) of the conda/mamba executable to use."
"--conda",
default=None,
help="path (or name) of the conda/mamba executable to use.",
envvar="CONDA_LOCK_CONDA",
)
@click.option(
"--mamba/--no-mamba",
default=HAVE_MAMBA,
help="don't attempt to use or install mamba.",
envvar="CONDA_LOCK_MAMBA",
)
@click.option(
"--micromamba/--no-micromamba",
default=False,
help="don't attempt to use or install micromamba.",
envvar="CONDA_LOCK_MICROMAMBA",
)
@click.option(
"-p",
Expand Down Expand Up @@ -1453,17 +1458,22 @@ def lock(

@main.command("install", context_settings={"show_default": True})
@click.option(
"--conda", default=None, help="path (or name) of the conda/mamba executable to use."
"--conda",
default=None,
help="path (or name) of the conda/mamba executable to use.",
envvar="CONDA_LOCK_CONDA",
)
@click.option(
"--mamba/--no-mamba",
default=DEFAULT_INSTALL_OPT_MAMBA,
help="don't attempt to use or install mamba.",
envvar="CONDA_LOCK_MAMBA",
)
@click.option(
"--micromamba/--no-micromamba",
default=DEFAULT_INSTALL_OPT_MICROMAMBA,
help="don't attempt to use or install micromamba.",
envvar="CONDA_LOCK_MICROMAMBA",
)
@click.option(
"--copy",
Expand Down

0 comments on commit bb6b2d1

Please sign in to comment.