@@ -154,6 +154,9 @@ export class ArduinoApp {
154
154
155
155
args . push ( "--pref" , `build.path=${ outputPath } ` ) ;
156
156
arduinoChannel . info ( `Please see the build logs in Output path: ${ outputPath } ` ) ;
157
+
158
+ fs . unlinkSync ( path . join ( outputPath , "build.options.json" ) ) ;
159
+ util . rmdirRecursivelySync ( path . join ( outputPath , "sketch" ) ) ;
157
160
} else {
158
161
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README." ;
159
162
arduinoChannel . warning ( msg ) ;
@@ -224,6 +227,9 @@ export class ArduinoApp {
224
227
225
228
args . push ( "--pref" , `build.path=${ outputPath } ` ) ;
226
229
arduinoChannel . info ( `Please see the build logs in Output path: ${ outputPath } ` ) ;
230
+
231
+ fs . unlinkSync ( path . join ( outputPath , "build.options.json" ) ) ;
232
+ util . rmdirRecursivelySync ( path . join ( outputPath , "sketch" ) ) ;
227
233
} else {
228
234
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README." ;
229
235
arduinoChannel . warning ( msg ) ;
@@ -286,6 +292,9 @@ export class ArduinoApp {
286
292
287
293
args . push ( "--pref" , `build.path=${ outputPath } ` ) ;
288
294
arduinoChannel . info ( `Please see the build logs in Output path: ${ outputPath } ` ) ;
295
+
296
+ fs . unlinkSync ( path . join ( outputPath , "build.options.json" ) ) ;
297
+ util . rmdirRecursivelySync ( path . join ( outputPath , "sketch" ) ) ;
289
298
} else {
290
299
const msg = "Output path is not specified. Unable to reuse previously compiled files. Verify could be slow. See README." ;
291
300
arduinoChannel . warning ( msg ) ;
@@ -688,4 +697,4 @@ Please make sure the folder is not occupied by other procedures .`);
688
697
throw new Error ( "No sketch file was found." ) ;
689
698
}
690
699
}
691
- }
700
+ }
0 commit comments