Open riccardoporreca opened 2 years ago
Actually, a similar logic is implemented in run_lock()
(introduced in df566dcfdd1ba4e127efe27649748a088b573d97), which however accounts for the presence of the lock-file:
This should make the logic in the CLI unnecessary (although we might want to rely on DEFAULT_FILES
instead of allowing only for environment.yaml
)
Running w/o sources for dependencies is allowed by design (and would use the sources from the lockfile).
However, the CLI interface checks the existence of an
environment.y(a)ml
file for such cases, as this is the default:https://github.com/conda-incubator/conda-lock/blob/7d9bd6d67d59fdd30d92a2ace3ee344aafa6a2b1/conda_lock/conda_lock.py#L1134-L1143
How to reproduce
Running with lock-file only shows the help because no
environment.y(a)ml
exists:If we just create an empty
environment.yml
, the CLI gets past the check above and the rest behaves as expected