Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/node/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
const CPUFeatures = require('cpu-features');
const features = CPUFeatures();
if (features.arch === 'x86') {
const flags = features.flags as any; // CPUFeatures.X86CpuFlags

Check warning on line 162 in src/node/install.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 162 in src/node/install.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 162 in src/node/install.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
// if lacks any of the following instruction, use portable binary
cachedIsPortable = !(flags.avx2 && flags.sse4_2 && flags.bmi2 && flags.pclmulqdq);
} else {
Expand All @@ -178,7 +178,8 @@
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}`;
Expand All @@ -193,7 +194,8 @@
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}`;
Expand Down
Loading