Skip to content

Commit

Permalink
added support for musl dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ofirsnb committed Apr 10, 2024
1 parent d766f51 commit 35b93db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion node/npm/glide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import { arch, platform } from "process";
import { existsSync } from "fs";

let globalObject = global as unknown;

Expand All @@ -17,7 +18,9 @@ function loadNativeBinding() {
nativeBinding = require("@scope/glide-for-redis-linux-x64");
break;
case "arm64":
nativeBinding = require("@scope/glide-for-redis-linux-arm64");
nativeBinding = existsSync("./node_modules/@scope/glide-for-redis-linux-musl-arm64")
? require("@scope/glide-for-redis-linux-musl-arm64")
: require("@scope/glide-for-redis-linux-arm64")
break;
default:
throw new Error(
Expand Down
3 changes: 2 additions & 1 deletion node/npm/glide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"${scope}glide-for-redis-darwin-arm64": "${package_version}",
"${scope}glide-for-redis-darwin-x64": "${package_version}",
"${scope}glide-for-redis-linux-arm64": "${package_version}",
"${scope}glide-for-redis-linux-x64": "${package_version}"
"${scope}glide-for-redis-linux-x64": "${package_version}",
"${scope}glide-for-redis-linux-musl-arm64": "${package_version}"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit 35b93db

Please sign in to comment.