Skip to content

Commit

Permalink
Add recommendation if error with root prefix (#3513)
Browse files Browse the repository at this point in the history
Add recommendation if error
  • Loading branch information
Hind-M authored Oct 7, 2024
1 parent c4068d3 commit 215e5e5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions libmamba/src/api/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,12 @@ namespace mamba
&& !fs::exists(prefix / "envs"))
{
return make_unexpected(
fmt::format(R"(Path "{}" is not an existing root prefix.)", prefix.string()),
fmt::format(
R"(Path "{}" is not an existing root prefix.)"
R"( Please set explicitly `MAMBA_ROOT_PREFIX` to "{}" to skip this error.)",
prefix.string(),
prefix.string()
),
mamba_error_code::incorrect_usage
);
}
Expand Down Expand Up @@ -688,7 +693,9 @@ namespace mamba
return make_unexpected(
fmt::format(
R"(Could not use default root_prefix "{}":)"
R"( Directory exists, is not empty and not a conda prefix.)",
R"( Directory exists, is not empty and not a conda prefix.)"
R"( Please set explicitly `MAMBA_ROOT_PREFIX` to "{}" to skip this error.)",
prefix.string(),
prefix.string()
),
mamba_error_code::incorrect_usage
Expand Down

0 comments on commit 215e5e5

Please sign in to comment.