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 {
4343 return err
4444 }
4545
46+ if err := isConfigEnvValid (name ); err != nil {
47+ return err
48+ }
49+
4650 if err := IsLicenseValid (name ); err != nil {
4751 return err
4852 }
@@ -107,6 +111,26 @@ func areSecretsValid(name string) error {
107111 return nil
108112}
109113
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+
110134// check if the license is valid
111135// the license must be valid
112136func IsLicenseValid (name string ) error {
You can’t perform that action at this time.
0 commit comments