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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add more condarc paths #3695

wants to merge 1 commit into from

Conversation

SandrineP
Copy link

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