Skip to content

Commit 640b43e

Browse files
authored
fix path warning on windows (#629)
* fix path warning on windows Previously this was rendering as %!U(MISSING)SERPROFILE%!\(MISSING).krew\bin while installing on windows. Using %% solves that. Signed-off-by: Ahmet Alp Balkan <[email protected]> * update test Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent 6b66d78 commit 640b43e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/krew/cmd/internal/setup_check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
const (
3030
instructionWindows = `To be able to run kubectl plugins, you need to add the
31-
"%USERPROFILE%\.krew\bin" directory to your PATH environment variable
31+
"%%USERPROFILE%%\.krew\bin" directory to your PATH environment variable
3232
and restart your shell.`
3333
instructionUnixTemplate = `To be able to run kubectl plugins, you need to add
3434
the following to your %s

cmd/krew/cmd/internal/setup_check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestIsBinDirInPATH_secondRun(t *testing.T) {
4545
}
4646

4747
func TestSetupInstructions_windows(t *testing.T) {
48-
const instructionsContain = "add the\n\"%USERPROFILE%\\.krew\\bin\" directory to your PATH environment variable"
48+
const instructionsContain = `USERPROFILE`
4949
os.Setenv("KREW_OS", "windows")
5050
defer func() { os.Unsetenv("KREW_OS") }()
5151
instructions := SetupInstructions()

0 commit comments

Comments
 (0)