Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

mfisher87
Copy link
Contributor

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 :)

On my first attempt to use this action with a conda-lock file, I encountered a fairly [unintuitive error message](https://github.com/nsidc/qgreenland/actions/runs/5216719569/jobs/9415735414). I discovered I just needed to specify an environment name, and I thought this doc change might help someone else out there :)
@mfisher87 mfisher87 requested a review from pavelzw as a code owner June 9, 2023 01:28
@pavelzw pavelzw added the documentation Improvements or additions to documentation label Jun 9, 2023
@pavelzw
Copy link
Member

pavelzw commented Jun 9, 2023

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.

README.md Outdated Show resolved Hide resolved
@pavelzw pavelzw added this pull request to the merge queue Jun 9, 2023
Merged via the queue into mamba-org:main with commit cc9a6fb Jun 9, 2023
@pavelzw
Copy link
Member

pavelzw commented Jun 9, 2023

Thanks @mfisher87!

@jonashaag
Copy link
Collaborator

@pavelzw I think we should add a ^ to the regex here

const environmentName = fileContents.toString().match(/name:\s*(.*)/)?.[1]

@pavelzw
Copy link
Member

pavelzw commented Jun 9, 2023

That's a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants