sketch: avoid using tty when termui is false.
When using with -termui=false -verbose, the terminal does weird shit,
and there's a ladder effect. It's because a tty is being allocated
somehow. We don't need a tty unless we're using termui, so tightening up
the if/else on when we pass "-t" to Docker.
The logic here is detailed, so apologies if I got it wrong.
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index e14955d..ab3f8c1 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -484,7 +484,7 @@
"-p", hostPort + ":80", // forward container port 80 to a host port
"-e", "SKETCH_MODEL_API_KEY=" + config.ModelAPIKey,
}
- if !config.OneShot {
+ if !(config.OneShot || !config.TermUI) {
cmdArgs = append(cmdArgs, "-t")
}