git-userhub 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +12 -4
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -114,13 +114,21 @@ async function install() {
|
|
|
114
114
|
console.log(`🔍 Fetching release v${pkg.version}...`);
|
|
115
115
|
const release = await getRelease();
|
|
116
116
|
|
|
117
|
-
// Find the right asset
|
|
118
|
-
const
|
|
119
|
-
|
|
117
|
+
// Find the right asset dynamically
|
|
118
|
+
const asset = release.assets.find(a => {
|
|
119
|
+
const name = a.name.toLowerCase();
|
|
120
|
+
if (!name.includes(osName)) return false;
|
|
121
|
+
|
|
122
|
+
if (arch === 'arm64') {
|
|
123
|
+
return name.includes('arm64');
|
|
124
|
+
} else {
|
|
125
|
+
return name.includes('x86_64') || name.includes('amd64') || name.includes('x64');
|
|
126
|
+
}
|
|
127
|
+
});
|
|
120
128
|
|
|
121
129
|
if (!asset) {
|
|
122
130
|
console.error('❌ No binary found for your platform');
|
|
123
|
-
console.error(` Looking for: ${
|
|
131
|
+
console.error(` Looking for a ${osName} binary matching architecture: ${arch}`);
|
|
124
132
|
process.exit(1);
|
|
125
133
|
}
|
|
126
134
|
|