We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5eaf99 commit 531b6f1Copy full SHA for 531b6f1
pkg/cmd/cli/cmd/rsh.go
@@ -155,8 +155,9 @@ func (o *RshOptions) Validate() error {
155
// Run starts a remote shell session on the server
156
func (o *RshOptions) Run() error {
157
// Insert the TERM into the command to be run
158
- term := fmt.Sprintf("TERM=%s", util.Env("TERM", "xterm"))
159
- o.Command = append([]string{"env", term}, o.Command...)
160
-
+ if len(o.Command) == 1 && o.Command[0] == "/bin/sh" {
+ termsh := fmt.Sprintf("TERM=%s /bin/sh", util.Env("TERM", "xterm"))
+ o.Command = append(o.Command, "-c", termsh)
161
+ }
162
return o.ExecOptions.Run()
163
}
0 commit comments