fix(containers): fall back to image tag when version metadata is empty
This commit is contained in:
@@ -47,6 +47,10 @@ func InstallContainer(ctx context.Context, item types.RegistryContainer) error {
|
||||
}
|
||||
|
||||
// 2.5. Persist install metadata so installed-but-not-running state can be tracked without Docker lookups
|
||||
// The version is required for update detection; fall back to the image tag when the payload omitted it.
|
||||
if item.Version == "" {
|
||||
item.Version = imageTag(item.Image)
|
||||
}
|
||||
metadata := types.InstalledMetadata{
|
||||
RegistryContainer: item,
|
||||
InstalledAt: time.Now().UTC().Format(time.RFC3339),
|
||||
|
||||
Reference in New Issue
Block a user