Skip to content

Commit b5fe1b1

Browse files
committed
Proceed with upload even if port can't be found. (Issue #1791)
1 parent c387f87 commit b5fe1b1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

app/src/cc/arduino/packages/UploaderAndMonitorFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
public class UploaderAndMonitorFactory {
4141

4242
public Uploader newUploader(TargetBoard board, BoardPort port) {
43-
if ("true".equals(board.getPreferences().get("upload.via_ssh")) && "network".equals(port.getProtocol())) {
43+
if ("true".equals(board.getPreferences().get("upload.via_ssh")) && port != null && "network".equals(port.getProtocol())) {
4444
return new SSHUploader(port);
4545
}
4646

app/src/processing/app/Sketch.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,11 +1692,6 @@ protected boolean upload(String buildPath, String suggestedClassName, boolean us
16921692

16931693
BoardPort boardPort = Base.getDiscoveryManager().find(Preferences.get("serial.port"));
16941694

1695-
if (boardPort == null) {
1696-
editor.statusError(I18n.format("Board at {0} is not available", Preferences.get("serial.port")));
1697-
return false;
1698-
}
1699-
17001695
Uploader uploader = new UploaderAndMonitorFactory().newUploader(target.getBoards().get(board), boardPort);
17011696

17021697
boolean success = false;

0 commit comments

Comments
 (0)