From c0de9c54976d528ac97908d5bc3dadf18473b152 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Tue, 7 Sep 2021 19:49:01 -0700 Subject: [PATCH] Comment more thoroughly --- Library/Homebrew/sandbox.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index ce7549e7f3..9e30f01657 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -130,6 +130,10 @@ class Sandbox end if $stdin.tty? + # If stdin is a TTY, use io.raw to set stdin to a raw, passthrough + # mode while we copy the input/output of the process spawned in the + # PTY. After we've finished copying to/from the PTY process, io.raw + # will restore the stdin TTY to its original state. $stdin.raw(&write_to_pty) else write_to_pty.call