Skip to content

Commit

Permalink
Merge pull request #9164 from sharifelgamal/trim-project
Browse files Browse the repository at this point in the history
trim whitespace when setting gcp project id
  • Loading branch information
sharifelgamal authored Sep 2, 2020
2 parents 9e1d811 + ed4271f commit dd48dab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/addons/gcpauth/enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package gcpauth

import (
"bytes"
"context"
"os"
"os/exec"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit dd48dab

Please sign in to comment.