Permalink
Browse files

shell - returning back on initial shell location after 'app run' exec…

…ution.

Particularly when we move to cached apps or srv directories during module descriptor resolution.
  • Loading branch information...
fcamblor committed Aug 28, 2017
1 parent dca208d commit 85539e425ab9fb2a2c49405bc4da48c6e37c802d
Showing with 4 additions and 0 deletions.
  1. +4 −0 restx-core-shell/src/main/java/restx/core/shell/AppShellCommand.java
@@ -607,6 +607,7 @@ public RunAppCommandRunner(List<String> args) {
@Override
public void run(final RestxShell shell) throws Exception {
Path shellInitialLocation = shell.currentLocation();
if(appNameArg.isPresent()) {
shell.cd(standardCachedAppPath(appNameArg.get()));
}
@@ -691,6 +692,9 @@ public void run(final RestxShell shell) throws Exception {
.getComponent(AppSettings.class);
new ShellAppRunner(appSettings, appClassName, compileMode, quiet, daemon, vmOptions)
.run(shell);
// Moving back to initial location in case we either moved in cached apps or srv directory
shell.cd(shellInitialLocation);
}
private Optional<String> guessAppClassnameFromRestxModule(RestxShell shell) throws IOException {

0 comments on commit 85539e4

Please sign in to comment.