summaryrefslogtreecommitdiff
path: root/scripts/commandline.inc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/commandline.inc')
-rw-r--r--scripts/commandline.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/commandline.inc b/scripts/commandline.inc
index 8c5c56d5e..9c6787cb7 100644
--- a/scripts/commandline.inc
+++ b/scripts/commandline.inc
@@ -63,7 +63,14 @@ if (isset($longoptions)) {
$parser = new Console_Getopt();
-list($options, $args) = $parser->getopt($argv, $shortoptions, $longoptions);
+$result = $parser->getopt($argv, $shortoptions, $longoptions);
+
+if (PEAR::isError($result)) {
+ print $result->getMessage()."\n";
+ exit(1);
+} else {
+ list($options, $args) = $result;
+}
function show_help()
{