]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/jsch/JschExecutor.java
Move Swing JSCH UI in a separate package
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / jsch / JschExecutor.java
index dbf62721a08778fc15bf3b59a7e006d20677437f..b9d5f55c7af736ca0ce235add0423a7eb621e8dd 100644 (file)
@@ -77,6 +77,8 @@ public class JschExecutor implements Executor {
        public int execute(CommandLine command, Map environment)
                        throws ExecuteException, IOException {
                String cmd = command.toString();
+               if(workingDirectory!=null)
+                       cmd = "cd "+workingDirectory.getPath()+" && "+cmd;
                RemoteExec remoteExec = new RemoteExec();
                remoteExec.setSshTarget(sshTarget);
                remoteExec.setStreamHandler(streamHandler);