From a93cdc7298b7c571edabdcd96a30239f1b370378 Mon Sep 17 00:00:00 2001 From: Tim Snyder Date: Fri, 8 Mar 2024 09:23:29 -0600 Subject: [PATCH] Update header cmdlines in generated lockfiles (#518) Command lines suggested for install of the generated lockfile, which are put in the header of the generated lockfile, incorrectly suggest the use of a `--file` argument. `--file` is no longer an option in the conda-lock CLI. The lockfile is a positional parameter. fixes #518 --- conda_lock/lockfile/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda_lock/lockfile/__init__.py b/conda_lock/lockfile/__init__.py index 18c307725..cd1060842 100644 --- a/conda_lock/lockfile/__init__.py +++ b/conda_lock/lockfile/__init__.py @@ -187,14 +187,14 @@ def write_section(text: str) -> None: available, unless you explicitly update the lock file. Install this environment as "YOURENV" with: - conda-lock install -n YOURENV --file {path.name} + conda-lock install -n YOURENV {path.name} """ ) if "dev" in categories: write_section( f""" This lock contains optional development dependencies. Include them in the installed environment with: - conda-lock install --dev-dependencies -n YOURENV --file {path.name} + conda-lock install --dev-dependencies -n YOURENV {path.name} """ ) extras = sorted(categories.difference({"main", "dev"})) @@ -202,7 +202,7 @@ def write_section(text: str) -> None: write_section( f""" This lock contains optional dependency categories {', '.join(extras)}. Include them in the installed environment with: - conda-lock install {' '.join('-e '+extra for extra in extras)} -n YOURENV --file {path.name} + conda-lock install {' '.join('-e '+extra for extra in extras)} -n YOURENV {path.name} """ ) write_section(