mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Make exec more consistent with the rest of the kubectl commands.
This commit is contained in:
@@ -980,7 +980,7 @@ func (r *runtime) ExecInContainer(containerID string, cmd []string, stdin io.Rea
|
||||
}
|
||||
if stdin != nil {
|
||||
// Use an os.Pipe here as it returns true *os.File objects.
|
||||
// This way, if you run 'kubectl exec -p <pod> -i bash' (no tty) and type 'exit',
|
||||
// This way, if you run 'kubectl exec <pod> -i bash' (no tty) and type 'exit',
|
||||
// the call below to command.Run() can unblock because its Stdin is the read half
|
||||
// of the pipe.
|
||||
r, w, err := os.Pipe()
|
||||
|
Reference in New Issue
Block a user