Unverified Commit 5beeba43 authored by Cristian Maglie's avatar Cristian Maglie Committed by GitHub

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.
parent edc63f83
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment