From 6562db4c47319f40ec0d045c725f9766a56e7e5a Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Thu, 20 Feb 2025 13:19:41 -0500 Subject: Bail out on bad arguments --- sboinstall | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sboinstall') diff --git a/sboinstall b/sboinstall index 73fb2f4..c2f2420 100755 --- a/sboinstall +++ b/sboinstall @@ -61,7 +61,7 @@ my $distclean = $config{DISTCLEAN}; my $jobs = $config{JOBS}; my ($help, $vers, $no_install, $non_int, $no_reqs, $compat32, $ctemp, $utemp, $reinstall); -GetOptions( +if (! GetOptions( 'help|h' => \$help, 'version|v' => \$vers, 'noclean|c=s' => \$noclean, @@ -74,7 +74,10 @@ GetOptions( 'reinstall' => \$reinstall, 'create-template=s' => \$ctemp, 'use-template=s' => \$utemp, -); +)) { + show_usage(); + exit 1; +} if ($help) { show_usage(); exit 0 } if ($vers) { show_version(); exit 0 } -- cgit v1.2.3