Skip to content

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Jan 13, 2023

Summary

Wait for copying from the stdout/stderr pipe to finish in Install before calling cmd.Wait. This fixes a race where the goroutine may try to read after the defer closes the pipe.

How was it tested?

Ran devbox add go in a container without Nix installed.

Wait for copying from the stdout/stderr pipe to finish in Install before
calling cmd.Wait. This fixes a race where the goroutine may try to read
after the defer closes the pipe.
@gcurtis gcurtis requested a review from mikeland73 January 13, 2023 19:23
@gcurtis gcurtis merged commit e059029 into main Jan 13, 2023
@gcurtis gcurtis deleted the gcurtis/nix-install-wait branch January 13, 2023 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants