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 {
2828 return fmt .Sprint (* v )
2929}
3030
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+
3147func (v * valueFiles ) Type () string {
3248 return "valueFiles"
3349}
Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ func (d *diffCmd) run() error {
8989 return err
9090 }
9191
92+ if err := d .valueFiles .Valid (); err != nil {
93+ return err
94+ }
95+
9296 rawVals , err := d .vals ()
9397 if err != nil {
9498 return err
You can’t perform that action at this time.
0 commit comments