mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-08 08:01:15 -03:00
Migrate remaining calls from debug_safe to FLOGF_SAFE
This removes debug_level and remaining debug bits. We also simplify some of the exec errors, reducing them to a single line.
This commit is contained in:
12
src/fish.cpp
12
src/fish.cpp
@@ -296,17 +296,7 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) {
|
||||
break;
|
||||
}
|
||||
case 'd': {
|
||||
char *end;
|
||||
long tmp;
|
||||
|
||||
errno = 0;
|
||||
tmp = strtol(optarg, &end, 10);
|
||||
|
||||
if (tmp >= 0 && tmp <= 10 && !*end && !errno) {
|
||||
debug_level = static_cast<int>(tmp);
|
||||
} else {
|
||||
activate_flog_categories_by_pattern(str2wcstring(optarg));
|
||||
}
|
||||
activate_flog_categories_by_pattern(str2wcstring(optarg));
|
||||
for (auto cat : get_flog_categories()) {
|
||||
if (cat->enabled) {
|
||||
std::fwprintf(stdout, L"Debug enabled for category: %ls\n", cat->name);
|
||||
|
||||
Reference in New Issue
Block a user