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

Fix ownership of files created by conda init for PKG installers. #939

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marcoesters
Copy link
Contributor

@marcoesters marcoesters commented Feb 14, 2025

Description

When PKG installers are installed outside the $HOME directory, the installer installs as root (even though $USER is still the user executing the installer). This causes files and directories created by conda init to be owned by root. The current script appears to only pick up the first modified file so that some files are still owned by root. This PR fixes the issue by using a more bash v3 compliant way to read the multi-line string.

I'm not sure how this can be tested on the CI since the only time this problem appears is when the PKG installers are run interactively and the destination path is not inside $HOME. I don't know if this can be replicated on the CI.

However, I have created a Miniconda installer with this script and it had the correct permissions on macOS 12 and 15. It even fixed a previous installation that had the incorrect permissions.

P.S.: I will be on vacation until March 3rd, so I won't be able to address comments until then.

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?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Feb 14, 2025
@marcoesters marcoesters marked this pull request as ready for review February 14, 2025 00:52
@marcoesters marcoesters requested a review from a team as a code owner February 14, 2025 00:52
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
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants