Skip to content

Commit

Permalink
Select the current Jenkins if the name is empty when update config
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Mar 12, 2021
1 parent 26d3a58 commit e042f27
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/cmd/config_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ func (o *configUpdateOption) preRunE(_ *cobra.Command, args []string) (err error
if len(args) > 0 {
o.name = args[0]
}

if o.name == "" {
if jenkins := getCurrentJenkins(); jenkins != nil {
o.name = jenkins.Name
}
}
return
}

Expand Down

0 comments on commit e042f27

Please sign in to comment.