diff --git a/npm/build.sh b/npm/build.sh index b891840f..efc6a474 100755 --- a/npm/build.sh +++ b/npm/build.sh @@ -28,3 +28,5 @@ cp ../dist/windows_windows_386/bin/depot.exe packages/cli-win32-ia32/bin/ cp ../dist/windows_windows_amd64_v1/bin/depot.exe packages/cli-win32-x64/bin/ cp ../dist/windows_windows_arm_6/bin/depot.exe packages/cli-win32-arm/bin/ cp ../dist/windows_windows_arm64/bin/depot.exe packages/cli-win32-arm64/bin/ + +chmod +x packages/*/bin/* diff --git a/npm/src/install.ts b/npm/src/install.ts index e2f0b973..54e86057 100644 --- a/npm/src/install.ts +++ b/npm/src/install.ts @@ -238,7 +238,7 @@ function maybeOptimizePackage(binPath: string): void { async function downloadDirectlyFromNPM(pkg: string, subpath: string, binPath: string): Promise { // If that fails, the user could have npm configured incorrectly or could not // have npm installed. Try downloading directly from npm as a last resort. - const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace('@depot/cli-', '')}-${versionFromPackageJSON}.tgz` + const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace('@depot/', '')}-${versionFromPackageJSON}.tgz` console.error(`[@depot/cli] Trying to download ${JSON.stringify(url)}`) try { fs.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath))