-
-
Notifications
You must be signed in to change notification settings - Fork 114
arduino-builder incompatible with paths that contain , or ; #276
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
Comments
This looks much less scary than arduino/Arduino#7658 since it's only a sting splitting issue. I'll check it later today |
Forget my words, this is as bad as the other since it involves directly go |
You mean the commandline flags parsing package (this one, I guess? https://github.com/jessevdk/go-flags) I take it you mean that it is already the go-flags package that somehow splits on semicolons? Any idea if using semicolons/commas inside an option is some kind of feature of that package? Or is this really just a bug in that package? |
No, really the bundled one https://golang.org/pkg/flag/ ( diff --git a/arduino-builder/main.go b/arduino-builder/main.go
index 89c31bd..67573b7 100644
--- a/arduino-builder/main.go
+++ b/arduino-builder/main.go
@@ -255,6 +255,9 @@ func main() {
}
// FLAG_HARDWARE
+
+ fmt.Println(hardwareFoldersFlag)
+
if hardwareFolders, err := toSliceOfUnquoted(hardwareFoldersFlag); err != nil {
printCompleteError(err)
} else if len(hardwareFolders) > 0 { CLI: output:
so it splits the comma , not the semicolon (probably due to the fact that you can specify more than one argument, comma separated) |
I actually believe we implemented this ourselves: https://github.com/arduino/arduino-builder/blob/master/arduino-builder/main.go#L99-L113 Are we actually using this from the IDE (and/or is this a documented API)? I think we should not, instead just pass -hardware multiple times. On the arduino-builder side, we probably still need the custom type for the folder list, to allow specifying an option multple times (which I think |
Ah right, I totally missed it. We are not using it in any way, just passing multiple times is the way to go (so removing that line should solve the issue). |
Fixes arduino#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)
Fixes arduino#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)
Using Arduino IDE Beta Build 61 and Arduino IDE 1.8.6 Hourly Build 2018/05/28 09:33 under Windows 10 64 bit
foo;,bar
> OKA similar error occurs when the Arduino IDE is installed under a path that contains
,
. The same would surely occur with an installation path that contained;
but the Arduino IDE won't start under this path (arduino/Arduino#7658).If arduino-builder can't be made to support these characters then I recommend the sketchbook preference reject paths with them in it.
Originally reported at:
http://forum.arduino.cc/index.php?topic=550716
The text was updated successfully, but these errors were encountered: