-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update script to force x64 dep for canvas
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,10 +88,13 @@ echo "Installing Node dependencies to $PWD" | |
npm install --force --omit=dev | ||
|
||
# Add additional canvas dependency in x64 mode | ||
if [ "$(uname -m)" = "arm64" ]; then | ||
# Prepend node-mac-x64 to the PATH | ||
export PATH="$PWD/nodejs-mac-x64/bin:$PATH" | ||
arch -x86_64 npm install --force --omit=dev | ||
if [ "$(uname -m)" = "arm64" ] && /usr/bin/pgrep oahd >/dev/null 2>&1; then | ||
if [ -f package.json ]; then | ||
export PATH="$(dirname "$PWD")/nodejs-mac-x64/bin:$PATH" | ||
else | ||
export PATH="$PWD/nodejs-mac-x64/bin:$PATH" | ||
fi | ||
arch -x86_64 npm install @napi-rs/[email protected] --force --omit=dev | ||
fi | ||
|
||
echo "Build TypeScript" | ||
|