From 1f41de999112cfa65b7f84728e36c8b17d9e6a3e Mon Sep 17 00:00:00 2001 From: elastic17 <44340390+elastic17@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:08:31 +0800 Subject: [PATCH] Fix error handling in package update logic implementation (#3012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 去除environment创建操作中的注释及更新过程中存在的冗余代码 * Remove redundant code and simplify input parsing during HTTPTrigger creation * Fix error handling in package update logic implementation --------- Co-authored-by: yufu huang --- pkg/fission-cli/cmd/package/update.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/fission-cli/cmd/package/update.go b/pkg/fission-cli/cmd/package/update.go index e10ce88e..366ed3e4 100644 --- a/pkg/fission-cli/cmd/package/update.go +++ b/pkg/fission-cli/cmd/package/update.go @@ -66,10 +66,7 @@ func (opts *UpdateSubCommand) run(input cli.Input) error { pkgName := input.String(flagkey.PkgName) pkg, err := opts.Client().FissionClientSet.CoreV1().Packages(opts.pkgNamespace).Get(input.Context(), opts.pkgName, metav1.GetOptions{}) if err != nil { - return err - } - if err != nil { - return errors.Wrap(err, "get package") + return errors.Wrap(err, "error getting package") } forceUpdate := input.Bool(flagkey.PkgForce)