plu / simctl

Ruby interface to xcrun simctl
http://www.rubydoc.info/gems/simctl
MIT License
104 stars 19 forks source link

xcode-select -p with unescaped characters #21

Open sandersaelmans opened 7 years ago

sandersaelmans commented 7 years ago

Hey Johannes,

Within our server setup we use the SimCtl gem to spin up simulators for test automation. One of the problems we have is that we support multiple versions of xcode. Each version of xcode is separated by a space, and then the version number (so you get Xcode 9.1.0, Xcode 8.3.3, etc).

This however breaks the SimCtl gem since the var HOME in path.rb doesn't escape shell specific characters.

A simple fix would be to use shellwords to escape the outcome of xcode-select -p

Best regards, Sander Saelmans

plu commented 7 years ago

Escaping that sounds like a good idea. Would you like to create a pull request for that?

sandersaelmans commented 7 years ago

Sure, will do!