Skip to content

Commit 1fb9ccc

Browse files
rsoracmaglie
rsora
authored andcommitted
Add --input-file file existence check
1 parent 0d2278b commit 1fb9ccc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: commands/upload/upload.go

+3
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ func runProgramAction(pm *packagemanager.PackageManager,
244244
if !burnBootloader {
245245
if importFile != "" {
246246
importFilePath := paths.New(importFile)
247+
if !importFilePath.Exist() {
248+
return fmt.Errorf("binary file not found in %s", importFilePath)
249+
}
247250
importPath = importFilePath.Parent()
248251
// In general, the binary file extension (like .bin or .hex or even .zip) are already written explicitly in
249252
// the core recipes. This why the CLI removes it before setting the build.project_name property.

0 commit comments

Comments
 (0)