mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
parent
05b8d4de97
commit
ee943a0821
2 changed files with 6 additions and 5 deletions
|
@ -52,6 +52,7 @@ class category_list_t {
|
|||
category_t debug{L"debug", L"Debugging aid (on by default)", true};
|
||||
|
||||
category_t warning{L"warning", L"Warnings (on by default)", true};
|
||||
category_t warning_path{L"warning-path", L"Warnings about unusable paths for config/history (on by default)", true};
|
||||
|
||||
category_t config{L"config", L"Finding and reading configuration"};
|
||||
|
||||
|
|
10
src/path.cpp
10
src/path.cpp
|
@ -272,15 +272,15 @@ static void maybe_issue_path_warning(const wcstring &which_dir, const wcstring &
|
|||
|
||||
FLOG(error, custom_error_msg.c_str());
|
||||
if (path.empty()) {
|
||||
FLOGF(error, _(L"Unable to locate the %ls directory."), which_dir.c_str());
|
||||
FLOGF(error, _(L"Please set the %ls or HOME environment variable before starting fish."),
|
||||
FLOGF(warning_path, _(L"Unable to locate the %ls directory."), which_dir.c_str());
|
||||
FLOGF(warning_path, _(L"Please set the %ls or HOME environment variable before starting fish."),
|
||||
xdg_var.c_str());
|
||||
} else {
|
||||
const wchar_t *env_var = using_xdg ? xdg_var.c_str() : L"HOME";
|
||||
FLOGF(error, _(L"Unable to locate %ls directory derived from $%ls: '%ls'."),
|
||||
FLOGF(warning_path, _(L"Unable to locate %ls directory derived from $%ls: '%ls'."),
|
||||
which_dir.c_str(), env_var, path.c_str());
|
||||
FLOGF(error, _(L"The error was '%s'."), std::strerror(saved_errno));
|
||||
FLOGF(error, _(L"Please set $%ls to a directory where you have write access."), env_var);
|
||||
FLOGF(warning_path, _(L"The error was '%s'."), std::strerror(saved_errno));
|
||||
FLOGF(warning_path, _(L"Please set $%ls to a directory where you have write access."), env_var);
|
||||
}
|
||||
ignore_result(write(STDERR_FILENO, "\n", 1));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue