When running 'gnulib-tool' with the mode --update and extra arguments:
$ env GNULIB_TOOL_IMPL=sh gnulib-tool --update --vc-files
gnulib-tool: invalid options for 'update' mode
Try 'gnulib-tool --help' for more information.
If you really want to modify the gnulib configuration of your project,
you need to use 'gnulib --import' - at your own risk!
I've attached a patch correcting the program name in this line:
you need to use 'gnulib --import' - at your own risk!
The program name should be 'gnulib-tool'.
In main() of the Python version uses a mix of APP['name'] and
hard-coded 'gnulib-tool' which is a bit strange. In this example it
uses APP['name'].
/home/collin/.local/src/gnulib/gnulib-tool.py: *** invalid options for --update
mode
Try 'gnulib-tool --help' for more information.
/home/collin/.local/src/gnulib/gnulib-tool.py: *** Stop.
In this case the error message is incorrect, probably just out of
date. But I would also prefer just hard-code 'gnulib-tool' as the
program name.
Any objections? I think it is fine since the program name hasn't
changed in 20 years.
Collin
From cae0e724baff3438dea796f5f7ff7bd17e04a9d8 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Thu, 2 May 2024 16:57:13 -0700
Subject: [PATCH] gnulib-tool.sh: Fix program name in error message.
* gnulib-tool.sh: Use 'gnulib-tool' instead of 'gnulib' as the program
name in the error message.
---
ChangeLog | 6 ++++++
gnulib-tool.sh | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d59f8d5c7e..d967c8cfac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-02 Collin Funk <collin.fu...@gmail.com>
+
+ gnulib-tool.sh: Fix program name in error message.
+ * gnulib-tool.sh: Use 'gnulib-tool' instead of 'gnulib' as the program
+ name in the error message.
+
2024-05-02 Collin Funk <collin.fu...@gmail.com>
DEPENDENCIES: Add Cygwin as supported platform.
diff --git a/gnulib-tool.sh b/gnulib-tool.sh
index b486e99b1e..521d16e47a 100755
--- a/gnulib-tool.sh
+++ b/gnulib-tool.sh
@@ -1584,7 +1584,7 @@ func_determine_path_separator
echo "gnulib-tool: invalid options for 'update' mode" 1>&2
echo "Try 'gnulib-tool --help' for more information." 1>&2
echo "If you really want to modify the gnulib configuration of your project," 1>&2
- echo "you need to use 'gnulib --import' - at your own risk!" 1>&2
+ echo "you need to use 'gnulib-tool --import' - at your own risk!" 1>&2
func_exit 1
fi
fi
--
2.44.0