Skip to content

Commit

Permalink
Better detection if serial port is required during upload. (#1398)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmaglie committed Jan 17, 2022
1 parent edc63f8 commit 5beeba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func runTool(recipeID string, props *properties.Map, outStream, errStream io.Wri
if strings.TrimSpace(recipe) == "" {
return nil // Nothing to run
}
if props.IsPropertyMissingInExpandPropsInString("serial.port", recipe) {
if props.IsPropertyMissingInExpandPropsInString("serial.port", recipe) || props.IsPropertyMissingInExpandPropsInString("serial.port.file", recipe) {
return fmt.Errorf(tr("no upload port provided"))
}
cmdLine := props.ExpandPropsInString(recipe)
Expand Down

0 comments on commit 5beeba4

Please sign in to comment.