Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
tunnel: fix crash from older tunnel version
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Oct 5, 2024
1 parent cbdf22b commit ea345c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/project/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,13 @@ func getCompletedEvent(ctx context.Context, stack auto.Stack) (*CompleteEvent, e
PrivateKey: match["privateKey"].(string),
Subnets: []string{},
}
for _, subnet := range match["subnets"].([]interface{}) {
tunnel.Subnets = append(tunnel.Subnets, subnet.(string))
subnets, ok := match["subnets"].([]interface{})
if ok {
for _, subnet := range subnets {
tunnel.Subnets = append(tunnel.Subnets, subnet.(string))
}
complete.Tunnels[resource.URN.Name()] = tunnel
}
complete.Tunnels[resource.URN.Name()] = tunnel
}

if hint, ok := outputs["_hint"].(string); ok {
Expand Down

0 comments on commit ea345c7

Please sign in to comment.