File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ func run(name string) error {
43
43
return err
44
44
}
45
45
46
+ if err := isConfigEnvValid (name ); err != nil {
47
+ return err
48
+ }
49
+
46
50
if err := IsLicenseValid (name ); err != nil {
47
51
return err
48
52
}
@@ -107,6 +111,26 @@ func areSecretsValid(name string) error {
107
111
return nil
108
112
}
109
113
114
+ // Check parameter usage is valid
115
+ func isConfigEnvValid (name string ) error {
116
+ server , err := readServerYaml (name )
117
+ if err != nil {
118
+ return err
119
+ }
120
+
121
+ for _ , e := range server .Config .Env {
122
+ if ! strings .HasPrefix (e .Value , "{{" ) {
123
+ continue
124
+ }
125
+ if ! strings .HasPrefix (e .Value , "{{" + server .Name + "." ) {
126
+ return fmt .Errorf ("server uses unknown parameter %q: %q" , server .Name , e .Value )
127
+ }
128
+ }
129
+
130
+ fmt .Println ("✅ Config env is valid" )
131
+ return nil
132
+ }
133
+
110
134
// check if the license is valid
111
135
// the license must be valid
112
136
func IsLicenseValid (name string ) error {
You can’t perform that action at this time.
0 commit comments