Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/generate-analytics-api: remove merged_output #432

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Mar 19, 2024

Just a quick fix for Homebrew/formulae.brew.sh#1104

Not sure how to reproduce original result.merged_output behavior. By default Utils.popen_read sends stderr to /dev/null.

Did try a StringIO but wasn't successful, e.g.

stderr = StringIO.new
result = Utils.popen_read(..., err: stderr)

I was able to get some stderr via IO.pipe but not sure if best way, e.g.

stderr = ""
IO.pipe do |rd, wr|
  result = Utils.popen_read(..., err: wr)
  wr.close
  stderr = rd.read
end

@Bo98
Copy link
Member

Bo98 commented Mar 20, 2024

We'll want stderr printing of some form so I've just tweaked it so it just prints directly always.

The code that's erroring will only happen if something else is erroring, which will likely have the information needed in stderr.

@Bo98 Bo98 merged commit 0f9a473 into Homebrew:master Mar 20, 2024
2 checks passed
@cho-m cho-m deleted the remove-merged_output branch March 20, 2024 01:25
@MikeMcQuaid
Copy link
Member

Thanks @cho-m and @Bo98!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants