@@ -178,12 +178,6 @@ func run(command *cobra.Command, args []string) {
178
178
// Make the filename without the FQBN configs part
179
179
fqbn .Configs = properties .NewMap ()
180
180
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 )
187
181
188
182
var importPath * paths.Path
189
183
var importFile string
@@ -193,9 +187,17 @@ func run(command *cobra.Command, args []string) {
193
187
} else {
194
188
importPath = paths .New (flags .importFile ).Parent ()
195
189
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 )]
199
201
}
200
202
201
203
uploadProperties .SetPath ("build.path" , importPath )
0 commit comments