Skip to content

Commit 857cc81

Browse files
committed
🐛 Init nil metadata
Initialize nil Metadata to avoid nil pointer errors in stable mode
1 parent 19b87a0 commit 857cc81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cmd/create.go

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
128128
case hashMode:
129129
createOption.Metadata = clusterstack.HandleHashMode(createOption.CurrentReleaseHash, config.Config.KubernetesVersion)
130130
case stableMode:
131+
createOption.Metadata = &clusterstack.MetaData{}
132+
131133
gc, err := client.NewFactory().NewClient(ctx)
132134
if err != nil {
133135
return nil, fmt.Errorf("failed to create new github client: %w", err)

0 commit comments

Comments
 (0)