Skip to content

Commit

Permalink
Fix changing env variable type
Browse files Browse the repository at this point in the history
With the following:

	koyeb service update myapp/svc --env MYENV=value
	koyeb service update myapp/svc --env MYENV=@xxx

We used to generate a bad request because this is changing the type of
the environment variable MYENV to "plain", then "secret". This is now
fixed.
  • Loading branch information
brmzkw committed Nov 7, 2024
1 parent e000ae8 commit 8558b31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/koyeb/flags_list/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func (f *FlagEnv) UpdateItem(env *koyeb.DeploymentEnv) {
env.Key = koyeb.PtrString(f.key)
if f.isSecret {
env.Secret = koyeb.PtrString(f.value)
env.Value = nil
} else {
env.Secret = nil
env.Value = koyeb.PtrString(f.value)
}
}
Expand Down

0 comments on commit 8558b31

Please sign in to comment.