Skip to content

Commit 42a9ace

Browse files
committed
fix: trim space before comparing storage version
1 parent 52ae42b commit 42a9ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ func (c *config) Load(path string, fsys fs.FS, overrides ...ConfigEditor) error
629629
}
630630
if version, err := fs.ReadFile(fsys, builder.StorageVersionPath); err == nil && len(version) > 0 {
631631
// Only replace image if local storage version is newer
632-
if i := strings.IndexByte(Images.Storage, ':'); semver.Compare(string(version), Images.Storage[i+1:]) > 0 {
632+
if i := strings.IndexByte(Images.Storage, ':'); semver.Compare(strings.TrimSpace(string(version)), Images.Storage[i+1:]) > 0 {
633633
c.Storage.Image = replaceImageTag(Images.Storage, string(version))
634634
}
635635
}

0 commit comments

Comments
 (0)