Skip to content

Commit 1144e87

Browse files
committed
Fix --no-color flag
Fixes databus23#98
1 parent 49879b1 commit 1144e87

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

cmd/helpers.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import (
55
"os"
66
"path/filepath"
77

8-
"k8s.io/client-go/util/homedir"
9-
108
flag "github.com/spf13/pflag"
9+
"k8s.io/client-go/util/homedir"
1110
"k8s.io/helm/pkg/helm"
1211
helm_env "k8s.io/helm/pkg/helm/environment"
1312
"k8s.io/helm/pkg/tlsutil"

cmd/revision.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"os"
77
"strconv"
88

9-
"github.com/databus23/helm-diff/diff"
10-
"github.com/databus23/helm-diff/manifest"
119
"github.com/spf13/cobra"
1210
"k8s.io/helm/pkg/helm"
11+
12+
"github.com/databus23/helm-diff/diff"
13+
"github.com/databus23/helm-diff/manifest"
1314
)
1415

1516
type revision struct {
@@ -43,7 +44,7 @@ func revisionCmd() *cobra.Command {
4344
Use: "revision [flags] RELEASE REVISION1 [REVISION2]",
4445
Short: "Shows diff between revision's manifests",
4546
Long: revisionCmdLongUsage,
46-
PersistentPreRun: func(*cobra.Command, []string) {
47+
PreRun: func(*cobra.Command, []string) {
4748
expandTLSPaths()
4849
},
4950
RunE: func(cmd *cobra.Command, args []string) error {

cmd/rollback.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package cmd
22

33
import (
4+
"errors"
45
"fmt"
56
"os"
67
"strconv"
78

8-
"errors"
9-
"github.com/databus23/helm-diff/diff"
10-
"github.com/databus23/helm-diff/manifest"
119
"github.com/spf13/cobra"
1210
"k8s.io/helm/pkg/helm"
11+
12+
"github.com/databus23/helm-diff/diff"
13+
"github.com/databus23/helm-diff/manifest"
1314
)
1415

1516
type rollback struct {
@@ -35,7 +36,7 @@ func rollbackCmd() *cobra.Command {
3536
Short: "Show a diff explaining what a helm rollback could perform",
3637
Long: rollbackCmdLongUsage,
3738
Example: " helm diff rollback my-release 2",
38-
PersistentPreRun: func(*cobra.Command, []string) {
39+
PreRun: func(*cobra.Command, []string) {
3940
expandTLSPaths()
4041
},
4142
RunE: func(cmd *cobra.Command, args []string) error {

cmd/upgrade.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package cmd
22

33
import (
4+
"errors"
45
"fmt"
56
"os"
67
"strings"
78

8-
"errors"
9+
"github.com/spf13/cobra"
10+
"k8s.io/helm/pkg/helm"
911

1012
"github.com/databus23/helm-diff/diff"
1113
"github.com/databus23/helm-diff/manifest"
12-
"github.com/spf13/cobra"
13-
"k8s.io/helm/pkg/helm"
1414
)
1515

1616
type diffCmd struct {
@@ -51,7 +51,7 @@ func newChartCommand() *cobra.Command {
5151
Args: func(cmd *cobra.Command, args []string) error {
5252
return checkArgsLength(len(args), "release name", "chart path")
5353
},
54-
PersistentPreRun: func(*cobra.Command, []string) {
54+
PreRun: func(*cobra.Command, []string) {
5555
expandTLSPaths()
5656
},
5757
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)