From 70ff5afc70a5025bb011c1ee4bd97763dd885841 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Sun, 15 Oct 2023 15:41:00 +0900 Subject: [PATCH] fix(update): check command line arguments --- pkg/controller/update/update.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/update/update.go b/pkg/controller/update/update.go index bda2705c7..d29233093 100644 --- a/pkg/controller/update/update.go +++ b/pkg/controller/update/update.go @@ -15,13 +15,13 @@ func (c *Controller) Update(ctx context.Context, logE *logrus.Entry, param *conf if err := c.updateCommand(ctx, logE, param); err != nil { return err } + if len(param.Args) != 0 { + return nil + } cfgFilePath, err := c.configFinder.Find(param.PWD, param.ConfigFilePath) if err != nil { return fmt.Errorf("find a configuration file: %w", err) } - if len(param.Args) != 0 { - return nil - } if err := c.update(ctx, logE, param, cfgFilePath); err != nil { return err }