Rewrap the isTerminal comment
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

This commit is contained in:
2026-09-22 23:49:34 +10:00
parent 0860da03c4
commit d39ca1e3a6
+4 -3
View File
@@ -44,9 +44,10 @@ func runWith(args []string, stdout, stderr io.Writer, interactive bool) int {
}
// isTerminal reports whether w is a terminal. Puppet hands the child a temp
// file as fd 1, never a terminal, so anything else is a machine caller. The check is a
// terminal ioctl, not a character-device stat: /dev/null is a character device,
// and so is the /dev/null the Go runtime reopens onto a closed fd 1 at startup.
// file as fd 1, never a terminal, so anything else is a machine caller. The
// check is a terminal ioctl, not a character-device stat: /dev/null is a
// character device, and so is the /dev/null the Go runtime reopens onto a
// closed fd 1 at startup.
func isTerminal(w io.Writer) bool {
f, ok := w.(*os.File)
if !ok {