Skip to contentSkip to conversation

configure: Show the option in case it is not known

PATCH In review Thomas Huth 2 participants 2 messages Jan 12, 2023 – Jan 17, 2023 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Show the option in case it is not known

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.

---
 configure | 2 ++
 1 file changed, 2 insertions(+)
configure +2 -0
index b81f2094..c36fd290 100755
@@ -178,6 +178,8 @@ while [[ "$1" = -* ]]; do
 	    usage
 	    ;;
 	*)
+	    echo "Unknown option '$opt'"
+	    echo
 	    usage
 	    ;;
     esac
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Thomas Huth

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.

---
  configure | 2 ++
  1 file changed, 2 insertions(+)