Drop jumping into shell when running without args

Change SpringCli so that running without arguments no longer jumps into
the embedded REPL shell. This restores the ability to obtain quick usage
help by simply typing `spring` from the command prompt.

Windows users or developers that prefer the embedded shell can still
launch it using `spring shell`.
This commit is contained in:
Phillip Webb
2014-01-02 14:26:04 -08:00
parent f56318e9b8
commit bd6c672bba
3 changed files with 6 additions and 43 deletions

View File

@@ -26,6 +26,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.cli.SpringCli.NoArgumentsException;
import org.springframework.boot.cli.SpringCli.NoHelpCommandArgumentsException;
import static org.hamcrest.Matchers.equalTo;
@@ -91,8 +92,8 @@ public class SpringCliTests {
@Test
public void runWithoutArguments() throws Exception {
this.thrown.expect(NoArgumentsException.class);
this.cli.run();
verify(this.shellCommand).run();
}
@Test