@@ -183,7 +183,7 @@ export class ArduinoApp {
183
183
this . _building = false ;
184
184
logger . notifyUserError ( "ArduinoApp.build" ,
185
185
reason ,
186
- `Unhandled exception when cleaning up build ( ${ mode } ). ` ) ;
186
+ `Unhandled exception when cleaning up build " ${ mode } ": ${ JSON . stringify ( reason ) } ` ) ;
187
187
return false ;
188
188
} ) ;
189
189
}
@@ -465,7 +465,6 @@ Please make sure the folder is not occupied by other procedures .`);
465
465
const dc = DeviceContext . getInstance ( ) ;
466
466
const args : string [ ] = [ ] ;
467
467
let restoreSerialMonitor : boolean = false ;
468
- const cocopa = makeCompilerParserContext ( dc ) ;
469
468
const verbose = VscodeSettings . getInstance ( ) . logLevel === constants . LogLevel . Verbose ;
470
469
471
470
if ( ! this . boardManager . currentBoard ) {
@@ -544,6 +543,8 @@ Please make sure the folder is not occupied by other procedures .`);
544
543
arduinoChannel . start ( `${ mode } sketch '${ dc . sketch } '` ) ;
545
544
546
545
if ( buildDir || dc . output ) {
546
+ // 2020-02-29, EW: This whole code appears a bit wonky to me.
547
+ // What if the user specifies an output directory "../builds/my project"
547
548
buildDir = path . resolve ( ArduinoWorkspace . rootPath , buildDir || dc . output ) ;
548
549
const dirPath = path . dirname ( buildDir ) ;
549
550
if ( ! util . directoryExistsSync ( dirPath ) ) {
@@ -589,6 +590,8 @@ Please make sure the folder is not occupied by other procedures .`);
589
590
// Push sketch as last argument
590
591
args . push ( path . join ( ArduinoWorkspace . rootPath , dc . sketch ) ) ;
591
592
593
+ const cocopa = makeCompilerParserContext ( dc ) ;
594
+
592
595
const cleanup = async ( result : "ok" | "error" ) => {
593
596
let ret = true ;
594
597
if ( result === "ok" ) {
0 commit comments