diff --git a/lib/gotsha/bash_command.rb b/lib/gotsha/bash_command.rb index a40f700..ee38821 100644 --- a/lib/gotsha/bash_command.rb +++ b/lib/gotsha/bash_command.rb @@ -18,7 +18,7 @@ def self.run!(command) exit_code = nil # This block is an ugly workaround to ensure the color output is stored both on Linux and Mac - PTY.spawn("bash", "-lc", "#{command}; printf \"\\n#{MARKER}%d\\n\" $?") do |r, _w, pid| + PTY.spawn("bash", "-c", "#{command}; printf \"\\n#{MARKER}%d\\n\" $?") do |r, _w, pid| r.each do |line| if line.start_with?(MARKER) exit_code = line.sub(MARKER, "").to_i