Forráskód Böngészése

enable socat but disable when wrapping PROG is sudo

Daniel Sheffield 3 hónapja
szülő
commit
a88bd2c48c
1 módosított fájl, 1 hozzáadás és 1 törlés
  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")" &