Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pkconfig path lookup using brew --prefix #38

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
exclude:
- os: windows-latest
config: {shards: '0.12.0', crystal: '0.35.1'}
- os: macos-latest
config: {shards: '0.12.0', crystal: '0.35.1'}

name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
exclude:
- os: windows-latest
config: {shards: '0.12.0', crystal: '0.35.1'}
- os: macos-latest
config: {shards: '0.12.0', crystal: '0.35.1'}

name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ async function installCrystalForMac({crystal, shards, arch = "x86_64", path}) {
} catch (e) {}
}

const {stdout} = await subprocess(["brew", "--prefix"]);
const homebrewPrefix = stdout.trim();
const globber = await Glob.create([
"/usr/local/Cellar/openssl*/*/lib/pkgconfig",
`${homebrewPrefix}/Cellar/openssl*/*/lib/pkgconfig`,
"/usr/local/opt/openssl/lib/pkgconfig",
].join("\n"));
let [pkgConfigPath] = await globber.glob();
Expand Down
Loading