startup: don't overwrite rcfile error messages on a Linux console
On a Linux VT, refuse to start when there are errors in a nanorc file, so that the messages no longer get overwritten -- which prevented the user from seeing and reading them. This fixes https://savannah.gnu.org/bugs/?54442.
Этот коммит содержится в:
родитель
2d434f63e2
Коммит
52d851a1aa
10
src/rcfile.c
10
src/rcfile.c
@ -1243,6 +1243,16 @@ void do_rcfiles(void)
|
||||
|
||||
check_vitals_mapped();
|
||||
|
||||
#ifdef __linux__
|
||||
/* On a Linux console, don't start nano when there are rcfile errors,
|
||||
* because otherwise these error messages get wiped. */
|
||||
if (on_a_vt && rcfile_with_errors) {
|
||||
fprintf(stderr, _("If needed, use nano with the -I option "
|
||||
"to adjust your nanorc settings.\n"));
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
free(nanorc);
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user