1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2018-08-04 10:40:08 +02:00
родитель 2d434f63e2
Коммит 52d851a1aa

Просмотреть файл

@ -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);
}