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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user