Skip to content

Commit d47f7f2

Browse files
committed
Fix installation on m1 mac
1 parent bbd8971 commit d47f7f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

binding.gyp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@
9090
}],
9191
['OS=="mac"', {
9292
"include_dirs" : [
93-
"/usr/local/Cellar/ffmpeg@5/5.1.3/include/"
93+
"/usr/local/Cellar/ffmpeg@5/5.1.3/include/",
94+
"/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/",
9495
],
9596
"library_dirs": [
9697
"/usr/local/Cellar/ffmpeg@5/5.1.3/lib/",
98+
"/opt/homebrew/Cellar/ffmpeg@5/5.1.3/lib/",
9799
]
98100
}],
99101
]

install_ffmpeg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ async function darwin() {
185185
output = await exec('brew list ffmpeg@5');
186186
returnMessage = 'FFmpeg already present via Homebrew.';
187187
} catch (err) {
188-
if (err.stderr !== 'Error: No such keg: /usr/local/Cellar/ffmpeg@5\n') {
188+
if (err.stderr.indexOf('Error: No such keg') === -1 &&
189+
err.stderr.indexOf('ffmpeg@5') === -1) {
189190
console.error(err);
190191
console.log('Either Homebrew is not installed or something else is wrong.\nExiting');
191192
process.exit(1);

0 commit comments

Comments
 (0)