IdeaGinkgo/Intellij-Ginkgo

Setting additional options with spaces does not work

zostay opened this issue · 3 comments

As of 0.5, multiple options now works, which is great. However, the splitting routine is just a basic space split, which means that adding options like -ldflags="-l -N" does not work. Ideally, it would be nice to have the same sort of shell-style quoting/escaping support that other built-in Run/Debug configuration dialogs have for command lines.

Its doing naive quote escaping for me
-ldflags="-l -N" ie results in
ginkgo.exe -v -ldflags=\"-l -N\" -r or ginkgo -v -ldflags=\"-l -N\" -r

do know if I need more slash more quotes?

I get:

/Users/sterling/go/bin/ginkgo -v -r --fail-fast --randomize-all --trace -progress -ldflags=\"-l -N\" --junit-report=junit.xml -v --compilers=4 test/integration -r
ginkgo run failed
  flag provided but not defined: -N"

Shell splitting requires a proper parser, not just a call to .split(" ") (but that is an excellent way to get 80% there). I assume IntelliJ has a thing for doing command-line parsing somewhere in the configuration or executor APIs.

However, JetBrains has dung for brains and hasn't published JavaDoc so it's a bit hard for me to navigate their SDK to find where it is. Probably they just want me to buy Ultimate on top of GoLand, but that's not going to happen.</rant>

this might be fixed.. I am now doing the same thing the go runner is doing