Skip to content

resubmit with signed off - added exception for incorrect board name string #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/arduino.cc/builder/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ const MSG_BOARD_UNKNOWN = "Board {0} (platform {1}, package {2}) is unknown"
const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"
const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"
const MSG_CANT_FIND_SKETCH_IN_PATH = "Unable to find {0} in {1}"
const MSG_FQBN_INVALID = "{0} is not a valid fully qualified board name. Required format is targetPackageName:targetPlatformName:targetBoardName."
const MSG_INVALID_QUOTING = "Invalid quoting: no closing [{0}] char found."
const MSG_LIB_LEGACY = "(legacy)"
const MSG_LIBRARIES_MULTIPLE_LIBS_FOUND_FOR = "Multiple libraries were found for \"{0}\""
Expand Down
3 changes: 3 additions & 0 deletions src/arduino.cc/builder/target_board_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func (s *TargetBoardResolver) Run(context map[string]interface{}) error {
fqbn := context[constants.CTX_FQBN].(string)

fqbnParts := strings.Split(fqbn, ":")
if len(fqbnParts) < 3 {
return utils.Errorf(context, constants.MSG_FQBN_INVALID, fqbn)
}
targetPackageName := fqbnParts[0]
targetPlatformName := fqbnParts[1]
targetBoardName := fqbnParts[2]
Expand Down