Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 21, 2023
1 parent 44ed1e6 commit a6e2826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/internal/database/postgres/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ func (db *Postgres) getBinaryVersion(pgConfigCmd string) (int, error) {
if !found {
return 0, fmt.Errorf("unable to detect postgres binary version in pg_config output, skipping upgrade, output:%q", binaryVersionString)
}
v, err := semver.NewVersion(binaryVersionString)
v, err := semver.NewVersion(strings.TrimSpace(binaryVersionString))
if err != nil {
return 0, fmt.Errorf("unable to parse postgres binary version %w", err)
return 0, fmt.Errorf("unable to parse postgres binary version in %q %w", binaryVersionString, err)
}
return int(v.Major()), nil
}
Expand Down

0 comments on commit a6e2826

Please sign in to comment.