Skip to content

Commit 34d796a

Browse files
Fix pkconfig path lookup using brew --prefix (#38)
1 parent 82b6b22 commit 34d796a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
exclude:
2828
- os: windows-latest
2929
config: {shards: '0.12.0', crystal: '0.35.1'}
30+
- os: macos-latest
31+
config: {shards: '0.12.0', crystal: '0.35.1'}
3032

3133
name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
3234
runs-on: ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
exclude:
2828
- os: windows-latest
2929
config: {shards: '0.12.0', crystal: '0.35.1'}
30+
- os: macos-latest
31+
config: {shards: '0.12.0', crystal: '0.35.1'}
3032

3133
name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
3234
runs-on: ${{ matrix.os }}

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ async function installCrystalForMac({crystal, shards, arch = "x86_64", path}) {
164164
} catch (e) {}
165165
}
166166

167+
const {stdout} = await subprocess(["brew", "--prefix"]);
168+
const homebrewPrefix = stdout.trim();
167169
const globber = await Glob.create([
168-
"/usr/local/Cellar/openssl*/*/lib/pkgconfig",
170+
`${homebrewPrefix}/Cellar/openssl*/*/lib/pkgconfig`,
169171
"/usr/local/opt/openssl/lib/pkgconfig",
170172
].join("\n"));
171173
let [pkgConfigPath] = await globber.glob();

0 commit comments

Comments
 (0)