diff --git a/src/node/install.ts b/src/node/install.ts index dbb8136..64f2e26 100644 --- a/src/node/install.ts +++ b/src/node/install.ts @@ -50,8 +50,8 @@ export async function downloadCKBBinaryAndUnzip(version: string) { fs.chmodSync(getCKBBinaryPath(version), '755'); // Make the binary executable logger.info(`CKB ${version} installed successfully.`); - } catch (error) { - logger.error('Error installing dependency binary:', error); + } catch (error: unknown) { + logger.error('Error installing dependency binary:', (error as Error).message); } } @@ -178,7 +178,8 @@ function buildCKBGithubReleasePackageName(version: string, opt: { os?: string; a const os = opt.os || getOS(); const arch = opt.arch || getArch(); - if (isPortable()) { + if (isPortable() && os !== 'pc-windows-msvc') { + // portable binary is not available for windows return `ckb_v${version}_${arch}-${os}-portable`; } else { return `ckb_v${version}_${arch}-${os}`; @@ -193,7 +194,8 @@ function buildCKBGithubReleasePackageNameWithExtension( const arch = opt.arch || getArch(); const extension = opt.ext || getExtension(); - if (isPortable()) { + if (isPortable() && os !== 'pc-windows-msvc') { + // portable binary is not available for windows return `ckb_v${version}_${arch}-${os}-portable.${extension}`; } else { return `ckb_v${version}_${arch}-${os}.${extension}`;