Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 20, 2023
1 parent 3aa09bc commit ed1bdfe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/internal/database/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ func (db *Postgres) Upgrade() error {
}

// Check if pg_upgrade is present
if _, err := os.Stat(postgresUpgradeCmd); errors.Is(err, fs.ErrNotExist) {
p, err := exec.LookPath(postgresUpgradeCmd)
if err != nil {
return err
}
if _, err := os.Stat(p); errors.Is(err, fs.ErrNotExist) {
db.log.Infow("pg_upgrade is not present, skipping upgrade")
return nil
}
Expand Down

0 comments on commit ed1bdfe

Please sign in to comment.