소스 검색

enable socat but disable when wrapping PROG is sudo

Daniel Sheffield 3 달 전
부모
커밋
a88bd2c48c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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")" &