Remove support for InitCommand outside REPL
In this commit we retain "init" as a command inside the ShellCommand but not on the bash command line. Seems to have an impact on performance so relevant to gh-212.
This commit is contained in:
@@ -99,7 +99,7 @@ public class InitCommandTests {
|
||||
@Test
|
||||
public void runOptions() throws Exception {
|
||||
SpringCli cli = new SpringCli();
|
||||
InitCommand command = cli.getInitCommand();
|
||||
InitCommand command = new InitCommand(cli);
|
||||
command.run("src/test/resources/commands/options.groovy");
|
||||
cli.find("foo").run("--foo=bar", "--bar=123");
|
||||
assertTrue(this.output.toString().contains("Hello Foo: bar=123"));
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ScriptCommandTests {
|
||||
public void init() {
|
||||
this.classLoader = Thread.currentThread().getContextClassLoader();
|
||||
this.cli = new SpringCli();
|
||||
this.init = this.cli.getInitCommand();
|
||||
this.init = new InitCommand(this.cli);
|
||||
executed = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user