Skip to content

Commit 9199e99

Browse files
committed
Avoid using square brackets when printing in machine format
Fixes arduino#208
1 parent 2dbe042 commit 9199e99

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/arduino.cc/builder/warn_about_arch_incompatible_libraries.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,18 @@ func (s *WarnAboutArchIncompatibleLibraries) Run(ctx *types.Context) error {
5959

6060
for _, importedLibrary := range ctx.ImportedLibraries {
6161
if !importedLibrary.SupportsArchitectures(archs) {
62-
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_WARN, constants.MSG_LIBRARY_INCOMPATIBLE_ARCH, importedLibrary.Name, importedLibrary.Archs, archs)
62+
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_WARN, constants.MSG_LIBRARY_INCOMPATIBLE_ARCH, importedLibrary.Name, sliceToCommaSeparatedString(importedLibrary.Archs), sliceToCommaSeparatedString(archs))
6363
}
6464
}
6565

6666
return nil
6767
}
68+
69+
func sliceToCommaSeparatedString(slice []string) string {
70+
str := "("
71+
str = str + slice[0]
72+
for i := 1; i < len(slice); i++ {
73+
str = str + ", " + slice[i]
74+
}
75+
return str + ")"
76+
}

0 commit comments

Comments
 (0)