From 9ab2aab849d343ae46958eca53d09ae848592358 Mon Sep 17 00:00:00 2001 From: Rocco Bowling Date: Wed, 6 May 2020 17:27:37 -0400 Subject: [PATCH] Stop swallowing "--" after the first one is processed by command parser Previously, the command parser would swallow all "--" after the first one. For me, this manifested itself in not allowing corral to be used with lldb "corral exec -- lldb ponyc -- $(ponyc) -V=0 -o ./build/ ./utility" since the second "--" is required to be passed to lldb. This change is dependency for a PR being submitted to corral to allow use of corral with lldb (for debugging ponyc itself). --- packages/cli/command_parser.pony | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/command_parser.pony b/packages/cli/command_parser.pony index fff33ccdfb..92d7023bfd 100644 --- a/packages/cli/command_parser.pony +++ b/packages/cli/command_parser.pony @@ -64,7 +64,7 @@ class CommandParser while tokens.size() > 0 do let token = try tokens.shift()? else "" end - if token == "--" then + if (token == "--") and (opt_stop == false) then opt_stop = true elseif not opt_stop and (token.compare_sub("--", 2, 0) == Equal) then