chore: slice replace loop

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
pull/319/head
guoguangwu 11 months ago
parent 6a17ed2d3c
commit 882e665f6d

@ -191,10 +191,7 @@ func (s *Server) ListenAndServe() error {
} }
} }
for _, arg := range cmdUserArgs { flags = append(flags, cmdUserArgs...)
flags = append(flags, arg)
}
cmd := exec.CommandContext(cmdCtx, s.executableBinary, flags...) cmd := exec.CommandContext(cmdCtx, s.executableBinary, flags...)
cmd.Env = append(sshSession.Environ(), fmt.Sprintf("TERM=%s", ptyReq.Term)) cmd.Env = append(sshSession.Environ(), fmt.Sprintf("TERM=%s", ptyReq.Term))
if proxy, ok := os.LookupEnv("HTTPS_PROXY"); ok { if proxy, ok := os.LookupEnv("HTTPS_PROXY"); ok {

Loading…
Cancel
Save