From e94b3ee56189aae3a11eff0822f7b18374f2dfa1 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Tue, 5 Jun 2018 14:17:25 +0200 Subject: [PATCH] Remove composite paths support from foldersFlag Fixes https://github.com/arduino/arduino-builder/issues/276 The only supported way to append multiple hardware/tools folders becomes specifying the same flag multiple times (which is the de-facto standard, since the Java IDE only uses this format) --- arduino-builder/main.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/arduino-builder/main.go b/arduino-builder/main.go index 89c31bdb..3d425e21 100644 --- a/arduino-builder/main.go +++ b/arduino-builder/main.go @@ -96,19 +96,8 @@ func (h *foldersFlag) String() string { return fmt.Sprint(*h) } -func (h *foldersFlag) Set(csv string) error { - var values []string - if strings.Contains(csv, string(os.PathListSeparator)) { - values = strings.Split(csv, string(os.PathListSeparator)) - } else { - values = strings.Split(csv, ",") - } - - for _, value := range values { - value = strings.TrimSpace(value) - *h = append(*h, value) - } - +func (h *foldersFlag) Set(folder string) error { + *h = append(*h, folder) return nil }