Skip to content

Commit f16bbaa

Browse files
author
Federico Fissore
committed
SSHUploader: if verbose, prints the actual command run on the remote board
1 parent fa6c931 commit f16bbaa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,11 @@ private boolean runUploadTool(SSH ssh, PreferencesMap prefs) throws Exception {
157157
}
158158

159159
String pattern = prefs.getOrExcept("upload.pattern");
160-
String[] cmd = StringReplacer.formatAndSplit(pattern, prefs, true);
161-
return ssh.execSyncCommand(StringUtils.join(cmd, " "), System.out, System.err);
160+
String command = StringUtils.join(StringReplacer.formatAndSplit(pattern, prefs, true), " ");
161+
if (verbose) {
162+
System.out.println(command);
163+
}
164+
return ssh.execSyncCommand(command, System.out, System.err);
162165
}
163166

164167
private void scpFiles(SCP scp, SSH ssh, File sourcePath, File sketch, List<String> warningsAccumulator) throws JSchException, IOException {

0 commit comments

Comments
 (0)