-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KUBE_EDITOR path with spaces on Windows doesn't work #117781
Comments
This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
i see a few more escape mechanisms in here: |
@dims I have added two more variants to the list, with backticks and carets; neither works. I have tried all variants in both CMD and PowerShell. |
/transfer kubernetes |
https://www.sublimetext.com/docs/command_line.html#windows this may be helpful but have not been tested. |
Fixed in #112104 (not yet merged). Just keep in mind that double-quotes need to be preserved when setting the set KUBE_EDITOR="C:\Program Files\Sublime Text 3\sublime_text.exe" $Env:KUBE_EDITOR="`"C:\Program Files\Sublime Text 3\sublime_text.exe`""
# or
$Env:KUBE_EDITOR='"C:\Program Files\Sublime Text 3\sublime_text.exe"' And with the fix from #112104 it will be possible to pass additional arguments like this (example for Notepad++): set KUBE_EDITOR="C:\Program Files\Notepad++\notepad++.exe" -multiInst -notabbar -nosession or $Env:KUBE_EDITOR="`"C:\Program Files\Notepad++\notepad++.exe`" -multiInst -notabbar -nosession"
# or
$Env:KUBE_EDITOR='"C:\Program Files\Notepad++\notepad++.exe" -multiInst -notabbar -nosession' |
/sig cli windows
This may be dup with #72734 closed). |
@pacoxu: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@pacoxu: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@iyear Thanks! This way I was able to find a workaround:
This does not fix the original issue, but does provide Windows users with a better editor, even when there are spaces in the path to the executable. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
What happened:
I'm trying to configure kubectl to edit files using Sublime Text 3. My Sublime Text is installed in the default location (
C:\Program files\Sublime Text 3\sublime_text.exe
), which contains spaces.I cannot seem to find the correct syntax for defining the KUBE_EDITOR environment variable, which works with this path.
Error produced:
What you expected to happen:
kubectl edit <resource>
starts Sublime Text with the given resource yaml, either in CMD or PowerShell.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I've tried the following values, none of these work:
C:\Program Files\Sublime Text 3\sublime_text.exe
(This is the correct path.)"C:\Program Files\Sublime Text 3\sublime_text.exe
"'C:\Program Files\Sublime Text 3\sublime_text.exe'
C:\\Program Files\\Sublime Text 3\\sublime_text.exe
file://C:/Program%20Files/Sublime%20Text%203/sublime_text.exe
C:\Program^ Files\Sublime^ Text^ 3\sublime_text.exe
C:\Program` Files\Sublime` Text` 3\sublime_text.exe
I have tried all variantions in both CMD and PowerShell.
Environment:
kubectl version
):cat /etc/os-release
):The text was updated successfully, but these errors were encountered: