Fix error handling in package update logic implementation (#3012)

* 去除environment创建操作中的注释及更新过程中存在的冗余代码

* Remove redundant code and simplify input parsing during HTTPTrigger creation

* Fix error handling in package update logic implementation

---------

Co-authored-by: yufu huang <yufu.huang@gientech.com>
This commit is contained in:
elastic17
2024-09-11 13:38:31 +05:30
committed by GitHub
co-authored by yufu huang
parent 5cdecefc49
commit 1f41de9991
+1 -4
View File
@@ -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)