fix: TERM env not set

master
Evan Chen 2021-11-18 15:32:50 +08:00
parent 6828e6397a
commit 9728bfab58
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ func (g *GTerm) WS(w http.ResponseWriter, r *http.Request) {
} else { } else {
l.Info("starting cmd => ", l.M(fmt.Sprintf("%+v", req), klog.FgHiGreen)) l.Info("starting cmd => ", l.M(fmt.Sprintf("%+v", req), klog.FgHiGreen))
cmd = exec.Command(req.Cmd, req.Args...) cmd = exec.Command(req.Cmd, req.Args...)
cmd.Env = req.Envs cmd.Env = append(req.Envs, "TERM=xterm-256color")
cmd.Dir = req.Dir cmd.Dir = req.Dir
} }
} else { } else {