File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,22 @@ func (v *valueFiles) String() string {
28
28
return fmt .Sprint (* v )
29
29
}
30
30
31
+ // Ensures all valuesFiles exist
32
+ func (v * valueFiles ) Valid () error {
33
+ errStr := ""
34
+ for _ , valuesFile := range * v {
35
+ if _ , err := os .Stat (valuesFile ); os .IsNotExist (err ) {
36
+ errStr += err .Error ()
37
+ }
38
+ }
39
+
40
+ if errStr == "" {
41
+ return nil
42
+ } else {
43
+ return errors .New (errStr )
44
+ }
45
+ }
46
+
31
47
func (v * valueFiles ) Type () string {
32
48
return "valueFiles"
33
49
}
Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ func (d *diffCmd) run() error {
89
89
return err
90
90
}
91
91
92
+ if err := d .valueFiles .Valid (); err != nil {
93
+ return err
94
+ }
95
+
92
96
rawVals , err := d .vals ()
93
97
if err != nil {
94
98
return err
You can’t perform that action at this time.
0 commit comments