Community
Participate
Working Groups
org.eclipse.ptp.remotetools.internal.common.RemoteScript.getScriptString() combines the individual commands set by org.eclipse.ptp.remotetools.internal.common.RemoteScript.setScript(String[]) with a ";". Thus all commands in the list are executed even if the first one fails. By far the most common use of executing a list of commands is that the first command is "cd $workingdir". If this fails the subsequent command is executed in the wrong working directory which can have unintended consequences. The only other usage of setScript(String[]) is for org.eclipse.ptp.remotetools.environment.launcher.internal.RemoteLaunchProcess.runApplication(). But even in that case I assume one would not want to run subsequent commands if an earlier failed. Thus, I suggest to replace ";" with "&&" in getScriptString. I tested that "&&" is supported in dash, bash, csh, tcsh, and zsh.
What about ksh?
(In reply to comment #1) > What about ksh? works too
should I commit this change or does this need more discussion/testing?
It definitely needs testing. Please commit and I'll do some basic testing with RDT and RMs.
committed