Browse Source

export NORAW=1 to disable raw mode in the client

Solomon Hykes 12 years ago
parent
commit
8c142c6127
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docker/docker.go

+ 2 - 2
docker/docker.go

@@ -160,7 +160,7 @@ func Fatal(err error) {
 
 func main() {
 	var err error
-	if IsTerminal(0) {
+	if IsTerminal(0) && os.Getenv("NORAW") == "" {
 		oldState, err = MakeRaw(0)
 		if err != nil {
 			panic(err)
@@ -185,7 +185,7 @@ func main() {
 	if err := <-receive_stdout; err != nil {
 		Fatal(err)
 	}
-	if IsTerminal(0) {
+	if IsTerminal(0) && os.Getenv("NORAW") == "" {
 		Restore(0, oldState)
 	} else {
 		if err := <-send_stdin; err != nil {