Skip to content

fix: skip mkdir ~/.conda when register_envs is false#1215

Merged
marcoesters merged 1 commit into
conda:mainfrom
chrisburr:fix/mkdir-conda-guard
Apr 15, 2026
Merged

fix: skip mkdir ~/.conda when register_envs is false#1215
marcoesters merged 1 commit into
conda:mainfrom
chrisburr:fix/mkdir-conda-guard

Conversation

@chrisburr

@chrisburr chrisburr commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Description

In DIRACGrid/DIRACOS2#174 we saw that the unconditional mkdir ~/.conda at the top of the base-environment install section fails under read-only $HOME. As this installer disables env registration it does not need ~/.conda/, so gate the mkdir on register_envs being true.

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?

The unconditional mkdir ~/.conda at the top of the base-environment
install section fails under read-only $HOME. Installers that disable
env registration do not need ~/.conda/environments.txt, so gate the
mkdir on register_envs being true.
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Apr 15, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Apr 15, 2026
@chrisburr
chrisburr marked this pull request as ready for review April 15, 2026 07:31
@chrisburr
chrisburr requested a review from a team as a code owner April 15, 2026 07:31
@chrisburr
chrisburr marked this pull request as draft April 15, 2026 08:12
@chrisburr
chrisburr marked this pull request as draft April 15, 2026 08:12
@chrisburr
chrisburr force-pushed the fix/mkdir-conda-guard branch 2 times, most recently from 35a8966 to 20bf60d Compare April 15, 2026 09:28
@chrisburr
chrisburr marked this pull request as ready for review April 15, 2026 09:28

@lrandersson lrandersson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this, I think it looks good! I'll let @marcoesters have the final word in case there is something that I might have missed.

@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Approved in 🔎 Review Apr 15, 2026
@marcoesters
marcoesters merged commit 311f763 into conda:main Apr 15, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Apr 15, 2026
@chrisburr
chrisburr deleted the fix/mkdir-conda-guard branch April 15, 2026 14:42
@chrisburr

Copy link
Copy Markdown
Contributor Author

Thanks for the prompt review!

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.

4 participants