@@ -178,12 +178,6 @@ func run(command *cobra.Command, args []string) {
178178 // Make the filename without the FQBN configs part
179179 fqbn .Configs = properties .NewMap ()
180180 fqbnSuffix := strings .Replace (fqbn .String (), ":" , "." , - 1 )
181- outputTmpFile , ok := uploadProperties .GetOk ("recipe.output.tmp_file" )
182- if ! ok {
183- formatter .PrintErrorMessage ("The platform does not define the required property 'recipe.output.tmp_file'." )
184- os .Exit (commands .ErrGeneric )
185- }
186- ext := filepath .Ext (outputTmpFile )
187181
188182 var importPath * paths.Path
189183 var importFile string
@@ -193,9 +187,17 @@ func run(command *cobra.Command, args []string) {
193187 } else {
194188 importPath = paths .New (flags .importFile ).Parent ()
195189 importFile = paths .New (flags .importFile ).Base ()
196- if strings .HasSuffix (importFile , ext ) {
197- importFile = importFile [:len (importFile )- len (ext )]
198- }
190+ }
191+
192+ outputTmpFile , ok := uploadProperties .GetOk ("recipe.output.tmp_file" )
193+ outputTmpFile = uploadProperties .ExpandPropsInString (outputTmpFile )
194+ if ! ok {
195+ formatter .PrintErrorMessage ("The platform does not define the required property 'recipe.output.tmp_file'." )
196+ os .Exit (commands .ErrGeneric )
197+ }
198+ ext := filepath .Ext (outputTmpFile )
199+ if strings .HasSuffix (importFile , ext ) {
200+ importFile = importFile [:len (importFile )- len (ext )]
199201 }
200202
201203 uploadProperties .SetPath ("build.path" , importPath )
0 commit comments