Skip to content

Commit 5beeba4

Browse files
authored
Better detection if serial port is required during upload. (#1398)
Previously we checked the recipe for the {serial.port} key to determine if the upload requires a serial port, but this is not sufficient because we must check also for the {serial.port.file} key.
1 parent edc63f8 commit 5beeba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: commands/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ func runTool(recipeID string, props *properties.Map, outStream, errStream io.Wri
560560
if strings.TrimSpace(recipe) == "" {
561561
return nil // Nothing to run
562562
}
563-
if props.IsPropertyMissingInExpandPropsInString("serial.port", recipe) {
563+
if props.IsPropertyMissingInExpandPropsInString("serial.port", recipe) || props.IsPropertyMissingInExpandPropsInString("serial.port.file", recipe) {
564564
return fmt.Errorf(tr("no upload port provided"))
565565
}
566566
cmdLine := props.ExpandPropsInString(recipe)

0 commit comments

Comments
 (0)