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)
|
pkgName := input.String(flagkey.PkgName)
|
||||||
pkg, err := opts.Client().FissionClientSet.CoreV1().Packages(opts.pkgNamespace).Get(input.Context(), opts.pkgName, metav1.GetOptions{})
|
pkg, err := opts.Client().FissionClientSet.CoreV1().Packages(opts.pkgNamespace).Get(input.Context(), opts.pkgName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return errors.Wrap(err, "error getting package")
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
return errors.Wrap(err, "get package")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
forceUpdate := input.Bool(flagkey.PkgForce)
|
forceUpdate := input.Bool(flagkey.PkgForce)
|
||||||
|
|||||||
Reference in New Issue
Block a user