| 163 | } |
| 164 | |
| 165 | func bindRuntimeLayoutResolver(runtime *app.Runtime, homeOverride string) error { |
| 166 | if runtime == nil { |
| 167 | return errors.New("runtime is nil") |
| 168 | } |
| 169 | if runtime.LayoutResolver != nil { |
| 170 | if homeOverride != "" { |
| 171 | return errors.New("--home cannot override an injected layout resolver") |
| 172 | } |
| 173 | return nil |
| 174 | } |
| 175 | |
| 176 | runtime.LayoutResolver = config.NewSystemResolver(homeOverride) |
| 177 | return nil |
| 178 | } |
| 179 | |
| 180 | func configureRuntimeConfig(runtime *app.Runtime) error { |
| 181 | if runtime.Config != nil { |