Skip to content

Commit

Permalink
Fixed prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 1, 2024
1 parent 0e1cda8 commit 26c708a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-14]
postgres-version: [16, 15, 14, 13, 12]
postgres-version: [14]
steps:
- uses: actions/checkout@v4
- uses: ./.
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ const database = process.env['INPUT_DATABASE'];
let bin;

if (isMac()) {
bin = `/usr/local/opt/postgresql@${postgresVersion}/bin`;
let dataDir = `/usr/local/var/postgresql@${postgresVersion}`;
const prefix = process.env['ImageOS'] == 'macos14' ? '/opt/homebrew' : '/usr/local'

bin = `${prefix}/opt/postgresql@${postgresVersion}/bin`;
let dataDir = `${prefix}/var/postgresql@${postgresVersion}`;

if (postgresVersion != 14 || process.env['ImageOS'] == 'macos13' || process.env['ImageOS'] == 'macos14') {
if (process.env['ImageOS'] != 'macos13' && process.env['ImageOS'] != 'macos14') {
Expand Down

0 comments on commit 26c708a

Please sign in to comment.