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 3, 2022
1 parent e70fef8 commit 45939e9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions hack/tools/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ type tiltSettings struct {
}

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

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

type debugConfig struct {
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 45939e9

Please sign in to comment.