Skip to content

Commit 126bb02

Browse files
authored
Fix bad error message when board ID part of FQBN is wrong (#1506)
1 parent 10beac7 commit 126bb02

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

arduino/cores/packagemanager/package_manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func (pm *PackageManager) ResolveFQBN(fqbn *cores.FQBN) (
186186
board := platformRelease.Boards[fqbn.BoardID]
187187
if board == nil {
188188
return targetPackage, platformRelease, nil, nil, nil,
189-
fmt.Errorf(tr("board %s:%s not found"), platformRelease, fqbn.BoardID)
189+
fmt.Errorf(tr("board %s not found"), fqbn.StringWithoutConfig())
190190
}
191191

192192
buildProperties, err := board.GetBuildProperties(fqbn.Configs)

i18n/data/en.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -2444,8 +2444,8 @@ msgid "binary file not found in %s"
24442444
msgstr "binary file not found in %s"
24452445

24462446
#: arduino/cores/packagemanager/package_manager.go:189
2447-
msgid "board %s:%s not found"
2448-
msgstr "board %s:%s not found"
2447+
msgid "board %s not found"
2448+
msgstr "board %s not found"
24492449

24502450
#: commands/board/list.go:41
24512451
msgid "board not found"

test/test_compile.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ def test_compile_using_boards_local_txt(run_command, data_dir):
865865
# Verifies compilation fails because board doesn't exist
866866
res = run_command(["compile", "--clean", "-b", fqbn, sketch_path])
867867
assert res.failed
868-
assert "Error during build: Error resolving FQBN: board arduino:avr@1.8.3:nessuno not found" in res.stderr
868+
assert "Error during build: Error resolving FQBN: board arduino:avr:nessuno not found" in res.stderr
869869

870870
# Use custom boards.local.txt with made arduino:avr:nessuno board
871871
boards_local_txt = Path(data_dir, "packages", "arduino", "hardware", "avr", "1.8.3", "boards.local.txt")
@@ -943,8 +943,7 @@ def test_compile_manually_installed_platform_using_boards_local_txt(run_command,
943943
res = run_command(["compile", "--clean", "-b", fqbn, sketch_path])
944944
assert res.failed
945945
assert (
946-
"Error during build: Error resolving FQBN: board arduino-beta-development:[email protected]:nessuno not found"
947-
in res.stderr
946+
"Error during build: Error resolving FQBN: board arduino-beta-development:avr:nessuno not found" in res.stderr
948947
)
949948

950949
# Use custom boards.local.txt with made arduino:avr:nessuno board

0 commit comments

Comments
 (0)