Skip to content

Commit ff6fbe1

Browse files
committed
Improve the rendering of the TUI
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent da6b3ff commit ff6fbe1

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

pkg/sandbox/sandbox.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,18 @@ func Ensure(ctx context.Context, wd, extra, template, configDir string) (string,
134134

135135
// BuildExecCmd assembles the `docker sandbox exec` command.
136136
func BuildExecCmd(ctx context.Context, name, wd string, cagentArgs, envFlags, envVars []string) *exec.Cmd {
137-
execArgs := []string{"sandbox", "exec", "-it", "-w", wd}
138-
execArgs = append(execArgs, envFlags...)
139-
execArgs = append(execArgs, name, "docker-agent", "run")
140-
execArgs = append(execArgs, cagentArgs...)
137+
args := []string{"sandbox", "exec", "-it", "-w", wd}
138+
args = append(args, envFlags...)
141139

142-
dockerCmd := exec.CommandContext(ctx, "docker", execArgs...)
140+
// Improve the rendering of the TUI
141+
args = append(args, "-e", "TERM=xterm-256color")
142+
args = append(args, "-e", "COLORTERM=truecolor")
143+
args = append(args, "-e", "LANG=en_US.UTF-8")
144+
145+
args = append(args, name, "docker-agent", "run")
146+
args = append(args, cagentArgs...)
147+
148+
dockerCmd := exec.CommandContext(ctx, "docker", args...)
143149
dockerCmd.Stdin = os.Stdin
144150
dockerCmd.Stdout = os.Stdout
145151
dockerCmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)