1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

SSHUploader: if verbose, prints the actual command run on the remote board

This commit is contained in:
Federico Fissore 2015-06-19 10:52:01 +02:00
parent fa6c931e7c
commit f16bbaa91d

View File

@ -157,8 +157,11 @@ public class SSHUploader extends Uploader {
}
String pattern = prefs.getOrExcept("upload.pattern");
String[] cmd = StringReplacer.formatAndSplit(pattern, prefs, true);
return ssh.execSyncCommand(StringUtils.join(cmd, " "), System.out, System.err);
String command = StringUtils.join(StringReplacer.formatAndSplit(pattern, prefs, true), " ");
if (verbose) {
System.out.println(command);
}
return ssh.execSyncCommand(command, System.out, System.err);
}
private void scpFiles(SCP scp, SSH ssh, File sourcePath, File sketch, List<String> warningsAccumulator) throws JSchException, IOException {