Before, the environment-name was parsed using regex. Then, because of #78, we switched to a regex that also includes the line start, i.e., ^name:\s*(.*) instead of name:\s*(.*).
This apparently doesn't work because the newlines %0A are not recognized by string.match.
We now switch to yaml parsing with js-yaml. This now also reads environment files correctly that have inline comments
name: myenv # this is a comment that doesn't belong to the name
dependencies:
- python
- ...
Conda environment files also support jinja2, see here. This is out of scope for this project since adding a whole new yaml-conda parser in JS is too much effort and technical debt for just letting setup-micromamba infer the name of the environment. For these use cases, provide a custom environment-name as indicated by the error message.
Fixes #81
Before, the
environment-name
was parsed using regex. Then, because of #78, we switched to a regex that also includes the line start, i.e.,^name:\s*(.*)
instead ofname:\s*(.*)
. This apparently doesn't work because the newlines%0A
are not recognized bystring.match
.We now switch to yaml parsing with
js-yaml
. This now also reads environment files correctly that have inline commentsConda environment files also support jinja2, see here. This is out of scope for this project since adding a whole new yaml-conda parser in JS is too much effort and technical debt for just letting
setup-micromamba
infer the name of the environment. For these use cases, provide a customenvironment-name
as indicated by the error message.