Remove unreachable code from fission-cli (#3039)
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
@@ -59,13 +59,10 @@ func (opts *InfoSubCommand) complete(input cli.Input) (err error) {
|
||||
|
||||
func (opts *InfoSubCommand) run(input cli.Input) error {
|
||||
pkg, err := opts.Client().FissionClientSet.CoreV1().Packages(opts.namespace).Get(input.Context(), opts.name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error finding package %s", opts.name)
|
||||
}
|
||||
|
||||
pkgutil.PrintPackageSummary(os.Stdout, pkg)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -58,10 +58,7 @@ func (opts *RebuildSubCommand) complete(input cli.Input) (err error) {
|
||||
func (opts *RebuildSubCommand) run(input cli.Input) error {
|
||||
pkg, err := opts.Client().FissionClientSet.CoreV1().Packages(opts.namespace).Get(input.Context(), opts.name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "find package")
|
||||
return errors.Wrapf(err, "package %s not found", opts.name)
|
||||
}
|
||||
|
||||
if pkg.Status.BuildStatus != fv1.BuildStatusFailed {
|
||||
|
||||
Reference in New Issue
Block a user