fix(cli): fallback to wasm32 if platform is not support (#1967)

This commit is contained in:
LongYinan 2024-02-21 23:48:29 +08:00 committed by GitHub
parent 8855f18f50
commit 0306e3045a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -318,11 +318,11 @@ switch (platform) {
} }
break break
default: default:
throw new Error(\`Unsupported architecture on Linux: \${arch}\`) loadError = new Error(\`Unsupported architecture on Linux: \${arch}\`)
} }
break break
default: default:
throw new Error(\`Unsupported OS: \${platform}, architecture: \${arch}\`) loadError = new Error(\`Unsupported OS: \${platform}, architecture: \${arch}\`)
} }
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {