sg: PipeOutputUnbuffered breaks when command exits too quickly
Created by: mrnugget
I had the wrong asdf
version so the yarn
command would immediately fail here:
$ go run . start web-standalone
💡 Installing 2 commands...
caddy installed
web-standalone-http installed
✅ 2/2 commands installed █████████████████████████████████████████████████████████████████████████████████████
✅ Everything installed! Booting up the system!
Running caddy...
panic: failed to pipe output: read |0: file already closed
goroutine 179 [running]:
github.com/sourcegraph/sourcegraph/lib/process.PipeOutputUnbuffered.func1({0x6234180, 0xc0000a01b0}, {0x6234580, 0xc000132290})
/Users/thorstenball/work/sourcegraph/lib/process/pipe.go:32 +0x94
github.com/sourcegraph/sourcegraph/lib/process.pipeOutputWithCopy.func2({0x6234180, 0xc0000a01b0}, {0x6234580, 0xc000132290})
/Users/thorstenball/work/sourcegraph/lib/process/pipe.go:63 +0x74
created by github.com/sourcegraph/sourcegraph/lib/process.pipeOutputWithCopy
/Users/thorstenball/work/sourcegraph/lib/process/pipe.go:67 +0x27d
exit status 2
Pretty sure it's related to this: https://github.com/sourcegraph/sourcegraph/pull/30672