Skip to content

Conversation

@dlaehnemann
Copy link
Contributor

@dlaehnemann dlaehnemann commented Dec 11, 2025

Description

This is an issue we came across very far downstream, when using the setup-miniconda GitHub Action in multiple steps of the same GitHub Actions job implicitly (through the snakemake GitHub Action that uses it, which we use for two subsequent steps).

Basically, the during first use of the snakemake GitHub Action, setup-miniconda installs miniforge without any issues. During the second install, it throws this error:

Running installer...
  /usr/bin/bash /home/runner/work/_temp/e83768cc-2602-4a3d-a62b-6a1cc1af9dd4.sh -f -b -p /home/runner/miniconda3
  PREFIX=/home/runner/miniconda3
  Unpacking bootstrapper...
  Warning: ln: failed to create symbolic link '/home/runner/miniconda3/_conda': File exists
  
  ln: failed to create symbolic link '/home/runner/miniconda3/_conda': File exists
Error: The process '/usr/bin/bash' failed with exit code 1

Finding out where that linking actually happens, so where the installers actually take their script code from, was a bit of treasure hunt. But here we are. The code I am suggesting to modify was only recently added in #1090 and thus seems very likely to be the cause of this. But if this forcing of the symlinking does not look like the correct fix to you, I'd be glad to stand corrected.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@dlaehnemann dlaehnemann requested a review from a team as a code owner December 11, 2025 11:42
@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Dec 11, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Dec 11, 2025
@dlaehnemann
Copy link
Contributor Author

I'm not sure if it makes sense to add a test case for this and whether this would need to be here, or rather somewhere downstream (e.g. miniforge?). It would basically mean running an installer twice, to ensure the installer works, even if a version of conda already exists...

@dlaehnemann
Copy link
Contributor Author

Pinging @marcoesters , as he reviewed the pull request #1090 that brought in this code.

@marcoesters
Copy link
Contributor

I'm not sure if it makes sense to add a test case for this and whether this would need to be here, or rather somewhere downstream (e.g. miniforge?). It would basically mean running an installer twice, to ensure the installer works, even if a version of conda already exists...

I agree that this is niche, especially since the -f flag rather brittle. I'm okay with not having a specific test here.

Copy link
Contributor

@marcoesters marcoesters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review Dec 15, 2025
@marcoesters marcoesters enabled auto-merge (squash) December 15, 2025 20:36
@marcoesters marcoesters merged commit a707971 into conda:main Dec 15, 2025
14 of 15 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Dec 15, 2025
@dlaehnemann dlaehnemann deleted the patch-1 branch December 15, 2025 20:58
@dlaehnemann
Copy link
Contributor Author

Perfect, that was quick. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants