mamba-org / setup-micromamba

GitHub Action to set up micromamba
MIT License
105 stars 16 forks source link

Document what it looks like to use a `conda-lock` environment file #78

Closed mfisher87 closed 1 year ago

mfisher87 commented 1 year ago

On my first attempt to use this action with a conda-lock file, I encountered a fairly unintuitive error message. I discovered I just needed to specify an environment name, and I thought this doc change might help someone else out there :)

pavelzw commented 1 year ago

Thanks for the addition!

What setup-micromamba does internally is search for a name: ... in the environment.yml file. If it doesn't find anything and environment-name is not set, an error is raised. In a lock file, though, the action can find a name: ... and thinks incorrectly that the environment name is set.

pavelzw commented 1 year ago

Thanks @mfisher87!

jonashaag commented 1 year ago

@pavelzw I think we should add a ^ to the regex here https://github.com/mamba-org/setup-micromamba/blob/cc9a6fb8a9ffb265351b3a292bf890b96c934e9b/src/util.ts#L53

pavelzw commented 1 year ago

That's a good idea!