lib/simctl/command/spawn.rb in simctl-1.6.2 vs lib/simctl/command/spawn.rb in simctl-1.6.3

- old
+ new

@@ -7,11 +7,13 @@ # # @param device [SimCtl::Device] the device to spawn a process on # @param path [String] path to executable # @param args [Array] arguments for the executable # @return [String] standard output the spawned process generated - def spawn(device, path, args=[], opts={}) - Executor.execute(command_for('spawn', device.udid, Shellwords.shellescape(path), *args.map{|a| Shellwords.shellwords(a)})) do |output| + def spawn(device, path, args = [], _opts = {}) + escaped_path = Shellwords.shellescape(path) + command = command_for('spawn', device.udid, escaped_path, *args.map { |a| Shellwords.shellwords(a) }) + Executor.execute(command) do |output| output end end end end