aboutsummaryrefslogtreecommitdiff
path: root/sboclean
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2025-02-20 13:19:41 -0500
committerSlack Coder <slackcoder@server.ky>2025-02-20 14:44:17 -0500
commit6562db4c47319f40ec0d045c725f9766a56e7e5a (patch)
tree65bb4dbcfc6cc99542a3a65faeb7b97d0899fe2b /sboclean
parent857080314ce717ce18c12106947456e7e12958b9 (diff)
downloadsbotools2-6562db4c47319f40ec0d045c725f9766a56e7e5a.tar.xz
Bail out on bad arguments
Diffstat (limited to 'sboclean')
-rwxr-xr-xsboclean7
1 files changed, 5 insertions, 2 deletions
diff --git a/sboclean b/sboclean
index 980de44..26594e8 100755
--- a/sboclean
+++ b/sboclean
@@ -42,13 +42,16 @@ EOF
my ($help, $vers, $dist, $work, $interactive);
-GetOptions(
+if (! GetOptions(
'help|h' => \$help,
'version|v' => \$vers,
'dist|clean-dist|d' => \$dist,
'work|clean-work|w' => \$work,
'interactive|i' => \$interactive,
-);
+)) {
+ show_usage();
+ exit 1;
+}
if ($help) { show_usage(); exit 0 }
if ($vers) { show_version(); exit 0 }