Skip to content

Commit d922c8d

Browse files
author
rsora
committed
Add comment in --input-file splitting step
1 parent d03da10 commit d922c8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

commands/upload/upload.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ func runProgramAction(pm *packagemanager.PackageManager,
240240
if !burnBootloader {
241241
if importFile != "" {
242242
importFilePath := paths.New(importFile)
243-
importFilePath.ToAbs()
244243
importPath = importFilePath.Parent()
244+
// In general, the binary file extension (like .bin or .hex or even .zip) are already written explicitly in
245+
// the core recipes. This why the CLI removes it before setting the build.project_name property.
246+
importFileName := strings.ReplaceAll(importFilePath.Base(), importFilePath.Ext(), "")
245247
uploadProperties.SetPath("build.path", importPath)
246-
uploadProperties.Set("build.project_name", importFilePath.Base())
247-
feedback.Printf("build.path %s", importPath.String())
248-
feedback.Printf("build.project_name %s", importFilePath.Base())
248+
uploadProperties.Set("build.project_name", importFileName)
249249
} else {
250250
if sketch == nil {
251251
return fmt.Errorf(("no sketch specified"))

0 commit comments

Comments
 (0)