Skip to content

Commit

Permalink
Fix context location in tilt-prepare
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed Nov 2, 2022
1 parent e70fef8 commit fa82512
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hack/tools/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ type tiltSettings struct {
}

type providerSettings struct {
Name string `json:"name,omitempty"`
Name string `json:"name,omitempty"`
Config *providerConfig `json:"config"`
}

type providerConfig struct {
Context *string `json:"context"`
}

Expand Down Expand Up @@ -309,8 +313,8 @@ func loadProviders(r string) (map[string]string, error) {

providerContexts := map[string]string{}
for _, p := range providerData {
if p.Context != nil {
contextPath = r + "/" + *p.Context
if p.Config != nil && p.Config.Context != nil {
contextPath = r + "/" + *p.Config.Context
} else {
contextPath = r
}
Expand Down

0 comments on commit fa82512

Please sign in to comment.