Skip to content

Commit

Permalink
Fixes issue with nil deployment stacks configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wbreza committed Sep 19, 2024
1 parent 7d3550d commit c31e94a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/azd/pkg/azapi/stack_deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,19 +524,19 @@ func parseDeploymentStackOptions(options map[string]any) (*deploymentStackOption

var deploymentStackOptions *deploymentStackOptions
has, err := optionsConfig.GetSection(deploymentStacksConfigKey, &deploymentStackOptions)
if !has {
return defaultDeploymentStackOptions, nil
}

if err != nil {
suggestion := &internal.ErrorWithSuggestion{
Err: fmt.Errorf("failed parsing deployment stack options: %w", err),
Suggestion: "Review the 'infra.config.deploymentStacks' configuration section in the 'azure.yaml' file.",
Suggestion: "Review the 'infra.deploymentStacks' configuration section in the 'azure.yaml' file.",
}

return nil, suggestion
}

if !has || deploymentStackOptions == nil {
return defaultDeploymentStackOptions, nil
}

if deploymentStackOptions.BypassStackOutOfSyncError == nil {
deploymentStackOptions.BypassStackOutOfSyncError = defaultDeploymentStackOptions.BypassStackOutOfSyncError
}
Expand Down

0 comments on commit c31e94a

Please sign in to comment.