Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Changed argument handling in EM.system introduces a breaking change #413
So it appears that previously, you could supply a string as a command, e.g.
Now that the command and arguments are explicitly split, the case statement here will never see a String anyway, and the first element of the array is assumed to be the command name. Unfortunately, if a string was supplied, the entire string is taken to be the command name e.g.
Ah, that makes sense. Does this fix the issue?
diff --git a/lib/em/processes.rb b/lib/em/processes.rb index db95982..4bbc14f 100644 --- a/lib/em/processes.rb +++ b/lib/em/processes.rb @@ -114,7 +114,7 @@ module EventMachine init = args.pop if args.last.is_a? Proc # merge remaining arguments into the command - cmd = [cmd, *args] + cmd = [cmd, *args] if args.any? EM.get_subprocess_pid(EM.popen(cmd, SystemCmd, cb) do |c| init[c] if init