Skip to content

Commit

Permalink
Proceed with upload even if port can't be found. (Issue esp8266#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
damellis committed Jun 11, 2014
1 parent c387f87 commit b5fe1b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion app/src/cc/arduino/packages/UploaderAndMonitorFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class UploaderAndMonitorFactory {

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

Expand Down
5 changes: 0 additions & 5 deletions app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -1692,11 +1692,6 @@ protected boolean upload(String buildPath, String suggestedClassName, boolean us

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

if (boardPort == null) {
editor.statusError(I18n.format("Board at {0} is not available", Preferences.get("serial.port")));
return false;
}

Uploader uploader = new UploaderAndMonitorFactory().newUploader(target.getBoards().get(board), boardPort);

boolean success = false;
Expand Down

0 comments on commit b5fe1b1

Please sign in to comment.