Skip to content

Commit 6e33256

Browse files
committed
rollback to backtick to support ruby 1.8.7: open3 do not support a way to get the return value
1 parent 42d5231 commit 6e33256

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/unitypods/cli.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def install
3939

4040
def init
4141
#TODO
42+
#TODO check if we are in a unity3d project
43+
4244
end
4345

4446
private
@@ -58,15 +60,9 @@ def copy_podfiles
5860
def run_pod_install
5961
FileUtils.cd(options[:buildprojectdir]) do # chdir
6062
cmd = "pod install --no-integrate"
61-
Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
62-
output = ""
63-
while line = stdout.gets
64-
output << line << "\n"
65-
puts line
66-
end
67-
exit_status = wait_thr.value
68-
raise Unitypods::PodsError.new("Failed #{cmd}: \n #{output}") unless exit_status.success?
69-
end
63+
output = `#{cmd} 2>&1`
64+
puts output
65+
raise Unitypods::PodsError.new("Failed #{cmd}: \n #{output}") unless $?.success?
7066
end # return to original directory
7167
end
7268

0 commit comments

Comments
 (0)