@@ -290,8 +290,8 @@ function setupConfig(Espruino, callback) {
290
290
if ( args . remotePeerID ) { // Remote connection enabled
291
291
if ( ! Espruino . Core . RemoteConnection )
292
292
throw new Error ( "WebRTC not loaded - run again with --verbose for more info" ) ;
293
- Espruino . Config . set ( "WEBRTC_BRIDGE_ID" , args . remotePeerID ) ;
294
- }
293
+ Espruino . Config . set ( "WEBRTC_BRIDGE_ID" , args . remotePeerID ) ;
294
+ }
295
295
if ( args . board ) {
296
296
log ( "Explicit board JSON supplied: " + JSON . stringify ( args . board ) ) ;
297
297
var jsonLoaded = function ( json ) {
@@ -457,7 +457,9 @@ function sendCode(callback) {
457
457
log ( "* with '-p devicePath' or use '--board BOARDNAME' *" ) ;
458
458
log ( "********************************************************************" ) ;
459
459
}
460
- if ( ! args . outputHEX ) {
460
+ if ( args . outputHEX ) {
461
+ Espruino . Config . SAVE_ON_SEND = - 1 ; // force tools not to mess with the file
462
+ } else {
461
463
// if we're supposed to upload code somewhere ensure we do that properly
462
464
if ( args . outputJS )
463
465
Espruino . Config . SAVE_ON_SEND = - 1 ; // force tools not to mess with the file
@@ -776,10 +778,10 @@ function getPortPath(port, callback) {
776
778
var timeout = args . scanTimeout * 2 ;
777
779
Espruino . Core . Serial . getPorts ( function cb ( ports , shouldCallAgain ) {
778
780
//log(JSON.stringify(ports,null,2));
779
- var found = ports . find ( function ( p ) {
780
- return ( p . description && p . description . toLowerCase ( ) . indexOf ( searchString ) >= 0 ) ||
781
+ var found = ports . find ( function ( p ) {
782
+ return ( p . description && p . description . toLowerCase ( ) . indexOf ( searchString ) >= 0 ) ||
781
783
( p . path && p . path . toLowerCase ( ) . indexOf ( searchString ) >= 0 ) ||
782
- p . autoconnect ;
784
+ p . autoconnect ;
783
785
} ) ;
784
786
if ( found ) {
785
787
log ( "Found " + JSON . stringify ( found . description ) + " (" + JSON . stringify ( found . path ) + ")" ) ;
0 commit comments