Skip to content

Commit

Permalink
🐛 Init nil metadata (#139)
Browse files Browse the repository at this point in the history
Initialize nil Metadata to avoid nil pointer errors in stable mode

Signed-off-by: janiskemper <[email protected]>
  • Loading branch information
janiskemper authored Jul 2, 2024
1 parent 19b87a0 commit ff77a29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
case hashMode:
createOption.Metadata = clusterstack.HandleHashMode(createOption.CurrentReleaseHash, config.Config.KubernetesVersion)
case stableMode:
createOption.Metadata = &clusterstack.MetaData{}

gc, err := client.NewFactory().NewClient(ctx)
if err != nil {
return nil, fmt.Errorf("failed to create new github client: %w", err)
Expand Down

0 comments on commit ff77a29

Please sign in to comment.