[X] I searched open requests and couldn't find a duplicate
What is the idea?
When I was using conda-lock I wanted to control the filename that conda-lock lock ... produces and used environment.yml.lock. I ran into an error when trying to run conda-lock install .... environment.yml.lock.
do_validate_platform(lockfile_contents)
File "/home/costrouc/.conda/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 180, in do_validate_platform
platform_lockfile = extract_platform(lockfile)
File "/home/costrouc/.conda/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 161, in extract_platform
raise RuntimeError("Cannot find platform in lockfile.")
RuntimeError: Cannot find platform in lockfile.
This happens because if the lockfile filename does not currently end in conda-lock.yml is parses it as a v1 explicit filename.
What should happen?
Attempt to parse the lockfile as a version 2 yaml file even when the extension is not environment.yml.lock.
Additional Context
Was at Scipy when I ran into this issue and was talking with @mariusvniekerk about it. Realistically this is a user error but I think this is a confusing issue to run into.
Checklist
What is the idea?
When I was using conda-lock I wanted to control the filename that
conda-lock lock ...
produces and usedenvironment.yml.lock
. I ran into an error when trying to runconda-lock install .... environment.yml.lock
.This happens because if the lockfile filename does not currently end in
conda-lock.yml
is parses it as a v1 explicit filename.What should happen?
Attempt to parse the lockfile as a version 2 yaml file even when the extension is not
environment.yml.lock
.Additional Context
Was at Scipy when I ran into this issue and was talking with @mariusvniekerk about it. Realistically this is a user error but I think this is a confusing issue to run into.