From ed4271ffbcdaf49b7c1a23e6574d1432f265708a Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Wed, 2 Sep 2020 11:42:47 -0700 Subject: [PATCH] trim whitespace when setting gcp project id --- pkg/addons/gcpauth/enable.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/addons/gcpauth/enable.go b/pkg/addons/gcpauth/enable.go index 2494c513e3..46c9ca0ec3 100644 --- a/pkg/addons/gcpauth/enable.go +++ b/pkg/addons/gcpauth/enable.go @@ -17,6 +17,7 @@ limitations under the License. package gcpauth import ( + "bytes" "context" "os" "os/exec" @@ -79,7 +80,7 @@ func enableAddon(cfg *config.ClusterConfig) error { // We're currently assuming gcloud is installed and in the user's path project, err := exec.Command("gcloud", "config", "get-value", "project").Output() if err == nil && len(project) > 0 { - f := assets.NewMemoryAssetTarget(project, projectPath, "0444") + f := assets.NewMemoryAssetTarget(bytes.TrimSpace(project), projectPath, "0444") return r.Copy(f) }