Change:
return append(shell, editor), true } <del> func (e Editor) args(path string) []string { args := make([]string, len(e.Args)) copy(args, e.Args) if e.Shell { last := args[len(args)-1] args[len(args)-1] = fmt.Sprintf("%s %q", last, path) } else { args = append(args, path) } return args } // Launch opens the described or returns an error. The TTY will be protected, and // SIGQUIT, SIGTERM, and SIGINT will all be trapped. func (e Editor) Launch(path string) error { if len(e.Args) == 0 { return fmt.Errorf("no editor defined, can't open %s", path) } abs, err := filepath.Abs(path) if err != nil { return err } args := e.args(abs) cmd := exec.Command(args[0], args[1:]...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin klog.V(5).Infof("Opening file with editor %v", args) if err := (term.TTY{In: os.Stdin, TryDev: true}).Safe(cmd.Run); err != nil { if err, ok := err.(*exec.Error); ok { if err.Err == exec.ErrNotFound { return fmt.Errorf("unable to launch the editor %q", strings.Join(e.Args, " ")) } } return fmt.Errorf("there was a problem with the editor %q", strings.Join(e.Args, " ")) } return nil } </del> // LaunchTempFile reads the provided stream into a temporary file in the given directory // and file prefix, and then invokes Launch with the path of that file. It will return // the contents of the file after launch, any errors that occur, and the path of the

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--I was trying to use a different editor than notepad on windows to be used by by setting the environment variable. Doing this was non trivial and the following did not work all resulting in different errors. What happened: What you expected to happen: I should be able to use normal windows paths, either by quoting them, or not. the workaround is to use a short filename however short paths are optional and may not always be created. () How to reproduce it (as minimally and precisely as possible): try and set an editor on windows where there is a space in the name of the command. Anything else we need to know?: Environment: Kubernetes version (use ): v1.10.3 Cloud provider or hardware configuration: N/A this is client side issue OS (e.g. from /etc/os-release): windows 10 1803 Kernel (e.g. ): :-) Install tools: Others:
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-testing, kubernetes/test-infra and/or . /close
Closing this issue. <detailsIn response to : Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository.

</details
In case anyone wants an answer, it needs two things: (or ) into system PATH environment variable EDITOR=notepad2 -w (or EDITOR=code -w)
Currently there is no way how to pass path with spaces on Windows with or environment variables. Pull Request addresses this issue. With the fix, you would be able to specify the following: and when is in your , you could do as well: or (this is current workaround for the problem)