diff mbox series

[kvm-unit-tests] configure: Show the option in case it is not known

Message ID 20230112095523.938919-1-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] configure: Show the option in case it is not known | expand

Commit Message

Thomas Huth Jan. 12, 2023, 9:55 a.m. UTC
When mis-typing one of the options of the configure script, it shows
you the list of valid options, but does not tell you which option was
wrong. Then it can take a while until you figured out where the typo is.
Let's help the user here a little bit by printing which option had not
been understood.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philippe Mathieu-Daudé Jan. 17, 2023, 7:12 a.m. UTC | #1
On 12/1/23 10:55, Thomas Huth wrote:
> When mis-typing one of the options of the configure script, it shows
> you the list of valid options, but does not tell you which option was
> wrong. Then it can take a while until you figured out where the typo is.
> Let's help the user here a little bit by printing which option had not
> been understood.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   configure | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/configure b/configure
index b81f2094..c36fd290 100755
--- a/configure
+++ b/configure
@@ -178,6 +178,8 @@  while [[ "$1" = -* ]]; do
 	    usage
 	    ;;
 	*)
+	    echo "Unknown option '$opt'"
+	    echo
 	    usage
 	    ;;
     esac