From c9701a0753f2dd064f0243a494cad56a6bb641be Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 15 Aug 2022 16:29:42 -0300 Subject: bin/uri: Fail when bad option is given --- bin/uri | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/uri b/bin/uri index 5466c09..4e57f7c 100755 --- a/bin/uri +++ b/bin/uri @@ -51,7 +51,10 @@ for (@ARGV) { } my %opts; -Getopt::Std::getopts('edh', \%opts); +if (!Getopt::Std::getopts('edh', \%opts)) { + usage *STDERR; + exit 2; +} if ($opts{h}) { usage *STDOUT; -- cgit v1.2.3