Skip to content

Commit

Permalink
Switch version order in log message. (#25)
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Lorenc <[email protected]>
  • Loading branch information
dlorenc authored Feb 15, 2024
1 parent b03926c commit d7faf41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func checkPackageValues(pkgVersions map[string]*types.Package, modFile *modfile.
// In that case, skip the compare check.
if semver.IsValid(pkgVersions[require.Mod.Path].Version) {
if semver.Compare(require.Mod.Version, pkgVersions[require.Mod.Path].Version) > 0 {
return fmt.Errorf("package %s with version '%s' is already at version %s", require.Mod.Path, require.Mod.Version, pkgVersions[require.Mod.Path].Version)
return fmt.Errorf("package %s with version '%s' is already at version %s", require.Mod.Path, pkgVersions[require.Mod.Path].Version, require.Mod.Version)
}
} else {
fmt.Printf("Requesting pin to %s.\n This is not a valid SemVer, so skipping version check.\n", pkgVersions[require.Mod.Path].Version)
Expand Down

0 comments on commit d7faf41

Please sign in to comment.