File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 77
88 "github.com/samber/lo"
99 fly "github.com/superfly/fly-go"
10+
1011 "github.com/superfly/flyctl/internal/buildinfo"
1112 "github.com/superfly/flyctl/internal/containerconfig"
1213 "github.com/superfly/flyctl/internal/machine"
@@ -240,6 +241,15 @@ func hasContainerFiles(mConfig *fly.MachineConfig) bool {
240241}
241242
242243func (md * machineDeployment ) setMachineReleaseData (mConfig * fly.MachineConfig ) {
244+ if mConfig == nil {
245+ return
246+ }
247+
248+ // Set the release metadata if not already set
249+ if mConfig .Metadata == nil {
250+ mConfig .Metadata = make (map [string ]string )
251+ }
252+
243253 mConfig .Metadata = lo .Assign (mConfig .Metadata , map [string ]string {
244254 fly .MachineConfigMetadataKeyFlyReleaseId : md .releaseId ,
245255 fly .MachineConfigMetadataKeyFlyReleaseVersion : strconv .Itoa (md .releaseVersion ),
You can’t perform that action at this time.
0 commit comments