Skip to content

Commit

Permalink
small fix using concatenation operator
Browse files Browse the repository at this point in the history
  • Loading branch information
SandrineP committed Jan 8, 2025
1 parent b0b2e3e commit 4b8dfc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libmamba/src/api/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2049,21 +2049,21 @@ namespace mamba
fs::u8path(util::user_home_dir()) / ".condarc",
};

std::array<std::string, 3> condarc_list = {"/.condarc", "/condarc", "/condarc.d"};
std::array<std::string, 3> condarc_list = {".condarc", "condarc", "condarc.d"};
if (util::get_env("XDG_CONFIG_HOME"))
{
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);
conda_user.push_back(fs::u8path(xgd_config_home) / "conda" / path);
}
}
if (util::get_env("CONDA_PREFIX"))
{
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);
conda_user.push_back(fs::u8path(conda_prefix) / path);
}
}

Expand Down

0 comments on commit 4b8dfc0

Please sign in to comment.