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

add more condarc paths #3695

Merged
merged 3 commits into from
Jan 10, 2025
Merged

add more condarc paths #3695

merged 3 commits into from
Jan 10, 2025

Conversation

SandrineP
Copy link
Contributor

Fix #3259

@jjerphan jjerphan self-requested a review December 18, 2024 09:40
const std::string xgd_config_home = util::get_env("XDG_CONFIG_HOME").value();
for (const auto& path: condarc_list)
{
conda_user.push_back(fs::u8path(xgd_config_home) + "/conda" + path);
Copy link
Member

Choose a reason for hiding this comment

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

I think you can rely on the concatenation operator of the path (ie operator/) instead of that of strings:

conda_user.push_back(fs::u8path(xgd_config_home) / "conda" / path);

This requires to remove the heading / in the member of the condarc_list above.

const std::string conda_prefix = util::get_env("CONDA_PREFIX").value();
for (const auto& path: condarc_list)
{
conda_user.push_back(fs::u8path(conda_prefix) + path);
Copy link
Member

Choose a reason for hiding this comment

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

Same remark here.

@JohanMabille JohanMabille added the release::bug_fixes For PRs fixing bugs label Dec 18, 2024
@SandrineP
Copy link
Contributor Author

Thanks! It's done.

Copy link
Member

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

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

Once you've fixed the linter, we can merge it.

@JohanMabille JohanMabille merged commit 30546a3 into mamba-org:main Jan 10, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::bug_fixes For PRs fixing bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more condarc locations from Conda standard.
2 participants