Corrected ScriptExecution and added tests
This commit is contained in:
@@ -84,9 +84,8 @@ public class ScriptExecution extends Command {
|
||||
throw new CommandRunException(CommandRunExceptionType.USAGE,
|
||||
"Expecting a file", this); //$NON-NLS-1$
|
||||
}
|
||||
List<String> argsList = Arrays.asList(args);
|
||||
String scriptFile = argsList.remove(0);
|
||||
Object[] params = argsList.toArray();
|
||||
String scriptFile = args[0];
|
||||
Object[] params = Arrays.copyOfRange(args, 1, args.length);
|
||||
try (FileReader fReader = new FileReader(new File(scriptFile));
|
||||
BufferedReader reader = new BufferedReader(fReader)) {
|
||||
String cmd;
|
||||
|
||||
Reference in New Issue
Block a user