From e042f2749ff01ed38c0a1521580d13bb05b4864b Mon Sep 17 00:00:00 2001 From: rick <1450685+LinuxSuRen@users.noreply.github.com> Date: Fri, 12 Mar 2021 14:31:40 +0800 Subject: [PATCH] Select the current Jenkins if the name is empty when update config --- app/cmd/config_update.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/cmd/config_update.go b/app/cmd/config_update.go index aa2ff5ca..481c4301 100644 --- a/app/cmd/config_update.go +++ b/app/cmd/config_update.go @@ -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 }