Remove unreachable code from fission-cli (#3039)

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-10-11 13:01:36 +05:30
committed by GitHub
parent c43f6fe9c0
commit 2d70c9d65f
2 changed files with 2 additions and 8 deletions
+1 -4
View File
@@ -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
}
+1 -4
View File
@@ -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 {