Fix Windows terminal handling
Fix some issues with Windows terminal handling with respect to TTYs that came up as part of the code that adds support for terminal resizing.
This commit is contained in:
@@ -17,15 +17,14 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/pkg/term"
|
||||
"os"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
)
|
||||
|
||||
func NewKubectlServer() *Server {
|
||||
// need to use term.StdStreams to get the right IO refs on Windows
|
||||
stdin, stdout, stderr := term.StdStreams()
|
||||
cmd := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), stdin, stdout, stderr)
|
||||
cmd := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, os.Stdout, os.Stderr)
|
||||
localFlags := cmd.LocalFlags()
|
||||
localFlags.SetInterspersed(false)
|
||||
|
||||
|
Reference in New Issue
Block a user