From f19ca53f344a90fb7cf6051fbfbb44e03c763afc Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Mon, 22 Jun 2020 21:22:43 -0700 Subject: [PATCH 1/3] Do not output usage hint when shell=none. Since there is no shell, there is no clear way to expect how a usage hint will be interpretted. --- pkg/minikube/shell/shell.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/minikube/shell/shell.go b/pkg/minikube/shell/shell.go index fa44b3fd14c1..99d70487ca8c 100644 --- a/pkg/minikube/shell/shell.go +++ b/pkg/minikube/shell/shell.go @@ -124,10 +124,7 @@ REM @FOR /f "tokens=*" %%i IN ('%s') DO @%%i unsetSuffix: "\n", unsetDelimiter: "", usageHint: func(s ...interface{}) string { - return fmt.Sprintf(` -# %s -# eval $(%s) -`, s...) + return "" }, }, } From 33d4ecbcc169d6b6b193efdfe4fbaf2b1b06dbde Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Mon, 22 Jun 2020 21:36:08 -0700 Subject: [PATCH 2/3] Fix shell test to reflect the fact that shell=none no longer has a usage msg. --- pkg/minikube/shell/shell_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/minikube/shell/shell_test.go b/pkg/minikube/shell/shell_test.go index 042573a8ad0e..43dcdcaa71c6 100644 --- a/pkg/minikube/shell/shell_test.go +++ b/pkg/minikube/shell/shell_test.go @@ -40,8 +40,7 @@ func TestGenerateUsageHint(t *testing.T) { ;; (with-temp-buffer (shell-command "bar" (current-buffer)) (eval-buffer))`}, {EnvConfig{"fish"}, `# foo # bar | source`}, - {EnvConfig{"none"}, `# foo -# eval $(bar)`}, + {EnvConfig{"none"}, ``}, } for _, tc := range testCases { tc := tc From e1a7b225b3d84897b9682c917b94dd996f4e6bb8 Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Mon, 22 Jun 2020 22:00:31 -0700 Subject: [PATCH 3/3] Format code --- pkg/minikube/shell/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/shell/shell.go b/pkg/minikube/shell/shell.go index 99d70487ca8c..5155196bf4fc 100644 --- a/pkg/minikube/shell/shell.go +++ b/pkg/minikube/shell/shell.go @@ -124,7 +124,7 @@ REM @FOR /f "tokens=*" %%i IN ('%s') DO @%%i unsetSuffix: "\n", unsetDelimiter: "", usageHint: func(s ...interface{}) string { - return "" + return "" }, }, }