[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Config.pm (GNUT_load_init_file): Che
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/Config.pm (GNUT_load_init_file): Check if message is non-empty as well as defined before printing. (_GNUT_document_fatal): Keep going if FORCE is set. |
Date: |
Sat, 02 Sep 2023 20:57:02 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 7e52c84181 * tp/Texinfo/Config.pm (GNUT_load_init_file): Check if
message is non-empty as well as defined before printing.
(_GNUT_document_fatal): Keep going if FORCE is set.
7e52c84181 is described below
commit 7e52c84181cbe79f5bac292ae277c05831051467
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Sep 3 01:56:51 2023 +0100
* tp/Texinfo/Config.pm (GNUT_load_init_file): Check if
message is non-empty as well as defined before printing.
(_GNUT_document_fatal): Keep going if FORCE is set.
---
ChangeLog | 8 +++++++-
tp/Texinfo/Config.pm | 6 ++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6169811373..b63287cd45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,16 @@
+2023-09-03 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Config.pm (GNUT_load_init_file): Check if
+ message is non-empty as well as defined before printing.
+ (_GNUT_document_fatal): Keep going if FORCE is set.
+
2023-09-02 Gavin Smith <gavinsmith0123@gmail.com>
Fatal error for init file loading
* tp/Texinfo/Config.pm (_GNUT_document_fatal): copy
from _GNUT_document_warn and exit program.
- (_GNUT_load_init_file): Load init file with "do" rather than
+ (GNUT_load_init_file): Load init file with "do" rather than
"require". As calling code has already located the file with
Texinfo::Common::locate_init_file, we do not need "require" to
locate the file in @INC. Call _GNUT_document_fatal if "do"
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 52f0ca969f..6ed1d62e9e 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -124,9 +124,10 @@ sub _GNUT_document_warn($) {
sub _GNUT_document_fatal($) {
my $text = shift;
chomp ($text);
- die(_GNUT_encode_message(
+ warn(_GNUT_encode_message(
sprintf(__p("program name: error_message",
"%s: %s"), $real_command_name, $text)."\n"));
+ exit 1 unless (texinfo_get_conf('FORCE'));
}
# used to register messages by the user with texinfo_register_init_loading_*
@@ -139,11 +140,12 @@ sub GNUT_load_init_file($) {
push @init_file_loading_messages, [];
my $result = do($file);
+
my $message = $@;
my $read_error = $!;
if (!defined($result)) {
- if (defined($message)) {
+ if (defined($message) and $message ne '') {
_GNUT_document_fatal(sprintf
(__("error parsing %s: %s"),
_GNUT_decode_input($file), $message));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Config.pm (GNUT_load_init_file): Check if message is non-empty as well as defined before printing. (_GNUT_document_fatal): Keep going if FORCE is set.,
Gavin D. Smith <=