Skip to content
Snippets Groups Projects
Commit ba5dc266 authored by Carlos Galindo's avatar Carlos Galindo
Browse files

eKnife: fix bug for argument parsing

parent 3095b612
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,7 @@ public class EKnife { ...@@ -56,6 +56,7 @@ public class EKnife {
for (int argIndex = 0; argIndex < args.length; argIndex++) { for (int argIndex = 0; argIndex < args.length; argIndex++) {
final String arg = args[argIndex]; final String arg = args[argIndex];
boolean shift = false;
switch (arg) { switch (arg) {
case "-i": case "-i":
...@@ -77,6 +78,7 @@ public class EKnife { ...@@ -77,6 +78,7 @@ public class EKnife {
printHelp(); printHelp();
System.exit(1); System.exit(1);
} }
shift = true;
} }
switch (arg) { switch (arg) {
case "--help": case "--help":
...@@ -124,6 +126,7 @@ public class EKnife { ...@@ -124,6 +126,7 @@ public class EKnife {
printHelp(); printHelp();
System.exit(1); System.exit(1);
} }
if (shift) argIndex++;
} }
kArgs.completeData(); kArgs.completeData();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment