Skip to content

Commit

Permalink
Fixed an issue when bootsrapping on GCP using env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentganne committed Nov 29, 2018
1 parent 72a5495 commit e2179b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func InitExtraFlags(args []string, cmd *cobra.Command) {

// Arguments ending wih a plural 's' are considered to
// be slices
if strings.HasSuffix(args[i], "s") {
if strings.HasSuffix(args[i], "s") && !strings.HasSuffix(args[i], "credentials") {
// May have already been defined as string slice
// flags can appear several times
if cmd.PersistentFlags().Lookup(flagName) == nil {
Expand Down Expand Up @@ -472,7 +472,7 @@ func addServerExtraInfraParams(cfg *config.Configuration, infraParam string) {
// When the key/value pair is read from an environment variable, the value is
// read as a string. This needs to be changed if the variable is expected to
// be an array
if strings.HasSuffix(paramParts[2], "s") {
if strings.HasSuffix(paramParts[2], "s") && !strings.HasSuffix(paramParts[2], "credentials") {
// value should be a slice
switch value.(type) {
case string:
Expand Down

0 comments on commit e2179b9

Please sign in to comment.