Skip to content

Commit

Permalink
Update header cmdlines in generated lockfiles (#518)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
timsnyder authored Mar 8, 2024
1 parent 38ec395 commit a93cdc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conda_lock/lockfile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,22 @@ 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"}))
if extras:
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(
Expand Down

0 comments on commit a93cdc7

Please sign in to comment.