@agentfare/forge 0.2.1 → 0.2.2
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 +5 -1
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -66,7 +66,11 @@ async function main() {
|
|
|
66
66
|
console.log(`Downloaded to ${archivePath}`);
|
|
67
67
|
|
|
68
68
|
// Extract (tar.gz works on all platforms: Linux, macOS, Windows 10+)
|
|
69
|
-
|
|
69
|
+
// Normalize backslashes to forward slashes for tar compatibility on Windows
|
|
70
|
+
// --force-local prevents GNU tar from treating "X:/path" as a remote host
|
|
71
|
+
const normArchivePath = archivePath.replace(/\\/g, "/");
|
|
72
|
+
const normBinDir = binDir.replace(/\\/g, "/");
|
|
73
|
+
execSync(`tar xzf "${normArchivePath}" -C "${normBinDir}" --force-local`, { stdio: "inherit" });
|
|
70
74
|
|
|
71
75
|
// Make executable
|
|
72
76
|
const binaryName = getBinaryName();
|