From 957b96c1b5726703e895968d611b915e063abad8 Mon Sep 17 00:00:00 2001 From: David Majda Date: Wed, 26 Jan 2011 13:52:39 +0100 Subject: [PATCH] Add check for missing parameter of the -e/--export-var option. --- bin/pegjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/pegjs b/bin/pegjs index 38d6d6b..20e5e54 100755 --- a/bin/pegjs +++ b/bin/pegjs @@ -70,6 +70,9 @@ while (args.length > 0 && isOption(args[0])) { case "-e": case "--export-var": nextArg(); + if (args.length === 0) { + abort("Missing parameter of the -e/--export-var option."); + } exportVar = args[0]; break;