Browse Source

enable socat but disable when wrapping PROG is sudo

Daniel Sheffield 2 months ago
parent
commit
a88bd2c48c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      capture.sh

+ 1 - 1
capture.sh

@@ -38,7 +38,7 @@ EOF
 trap 'info' EXIT
 
 exec 2> >(tee -a "$DAT" "$ERR")
-if which socat 1>/dev/null 2>&1 && false
+if which socat && ! [ "$PROG" = "sudo" ] 1>/dev/null 2>&1
 then
 	tty="$(tty)"
 	socat PTY,rawer,link="$PTY" EXEC:"$(shell_escape tee -a "$DAT" "$OUT" "$tty")" &