Skip to content

Commit

Permalink
pipeline variables - fix issue where flags not loaded correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
3ximus committed Feb 22, 2024
1 parent efda7d9 commit 9987c15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/pipeline/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ var VariablesCmd = &cobra.Command{
repo := viper.GetString("repo")
variables := <-api.GetPipelineVariables(repo)

setVars, _ := cmd.Flags().GetStringSlice("set")
setVars, _ := cmd.Flags().GetStringArray("set")
upsertVariables(repo, setVars, variables, false)
setSecureVars, _ := cmd.Flags().GetStringSlice("set-secure")
setSecureVars, _ := cmd.Flags().GetStringArray("set-secure")
upsertVariables(repo, setSecureVars, variables, true)

deleteVars, _ := cmd.Flags().GetStringSlice("delete")
deleteVars, _ := cmd.Flags().GetStringArray("delete")
if len(deleteVars) > 0 {
for _, toDelete := range deleteVars {
for _, ev := range variables {
Expand Down

0 comments on commit 9987c15

Please sign in to comment.