Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Fix recursion creation of the 'sketch' folder in the output (#683) #719

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ export class ArduinoApp {

args.push("--pref", `build.path=${outputPath}`);
arduinoChannel.info(`Please see the build logs in Output path: ${outputPath}`);

fs.unlinkSync(path.join(outputPath, "build.options.json"));
util.rmdirRecursivelySync(path.join(outputPath, "sketch"));
} else {
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README.";
arduinoChannel.warning(msg);
Expand Down Expand Up @@ -224,6 +227,9 @@ export class ArduinoApp {

args.push("--pref", `build.path=${outputPath}`);
arduinoChannel.info(`Please see the build logs in Output path: ${outputPath}`);

fs.unlinkSync(path.join(outputPath, "build.options.json"));
util.rmdirRecursivelySync(path.join(outputPath, "sketch"));
} else {
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README.";
arduinoChannel.warning(msg);
Expand Down Expand Up @@ -286,6 +292,9 @@ export class ArduinoApp {

args.push("--pref", `build.path=${outputPath}`);
arduinoChannel.info(`Please see the build logs in Output path: ${outputPath}`);

fs.unlinkSync(path.join(outputPath, "build.options.json"));
util.rmdirRecursivelySync(path.join(outputPath, "sketch"));
} else {
const msg = "Output path is not specified. Unable to reuse previously compiled files. Verify could be slow. See README.";
arduinoChannel.warning(msg);
Expand Down