File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 77 "github.com/peterbourgon/ff/v3/ffcli"
88)
99
10- const Version = "v0.3.0 "
10+ const Version = "v0.3.1 "
1111
1212func NewVersionCmd () * ffcli.Command {
1313 c := & ffcli.Command {
Original file line number Diff line number Diff line change 55 "encoding/json"
66 "fmt"
77
8+ "github.com/fatih/color"
9+ apierrors "k8s.io/apimachinery/pkg/api/errors"
810 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
911 "k8s.io/apimachinery/pkg/types"
1012
@@ -14,6 +16,10 @@ import (
1416func (c * Client ) Rollouts (ctx context.Context ) (* v1alpha1.RolloutList , error ) {
1517 rls , err := c .rolloutsClientset .ArgoprojV1alpha1 ().Rollouts ("" ).List (ctx , metav1.ListOptions {})
1618 if err != nil {
19+ if apierrors .IsNotFound (err ) {
20+ fmt .Printf ("%s: %s\n \n " , color .YellowString ("warn: argo rollouts: not found" ), err )
21+ return new (v1alpha1.RolloutList ), nil
22+ }
1723 return nil , fmt .Errorf ("failed to load argo rollouts: %w" , err )
1824 }
1925 return rls , nil
You can’t perform that action at this time.
0 commit comments