Skip to content

Commit

Permalink
readlines must be called on stderr first
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeurer committed Mar 10, 2024
1 parent 79783e4 commit a257a39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/services/compats/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ def check_with_bundler_locally
SCRIPT
File.chmod 0755, file

stdout, stderr = Bundler.with_unbundled_env do
stderr, stdout = Bundler.with_unbundled_env do
Open3.popen3 file.to_s do
[_2, _3].map do |io|
# For some reason, the order matters: readlines must be called on stderr first. 🤷‍♂️
[_3, _2].map do |io|
io.readlines.map(&:strip)
end
end
Expand Down

0 comments on commit a257a39

Please sign in to comment.