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

Commit d09fd09

Browse files
aster94czgtest
authored andcommitted
apply commit microsoft#653 also to upload using programmer (microsoft#657)
1 parent 495ec92 commit d09fd09

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/arduino/arduino.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,14 @@ export class ArduinoApp {
206206
}
207207
if (dc.output) {
208208
const outputPath = path.resolve(ArduinoWorkspace.rootPath, dc.output);
209+
const dirPath = path.dirname(outputPath);
210+
if (!util.directoryExistsSync(dirPath)) {
211+
Logger.notifyUserError("InvalidOutPutPath", new Error(constants.messages.INVALID_OUTPUT_PATH + outputPath));
212+
return;
213+
}
214+
209215
args.push("--pref", `build.path=${outputPath}`);
216+
arduinoChannel.info(`Please see the build logs in Output path: ${outputPath}`);
210217
} else {
211218
const msg = "Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README.";
212219
arduinoChannel.warning(msg);

0 commit comments

Comments
 (0)