From 5491eed449f9a144dad3b022f390bccdaf6ad45e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 13 Aug 2021 10:52:51 +0200 Subject: [PATCH] Better detection of required serial port during upload. 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. --- commands/upload/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/upload/upload.go b/commands/upload/upload.go index e329506f129..9ffe5ef98fb 100644 --- a/commands/upload/upload.go +++ b/commands/upload/upload.go @@ -397,7 +397,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)