fix(prebuild): stop pnpm build from re-preparing resources

This commit is contained in:
wonfen
2026-08-18 23:03:54 +08:00
parent daadb126e0
commit 2436d5cf6a
5 changed files with 18 additions and 54 deletions
+3
View File
@@ -58,6 +58,9 @@ const ARCH_MAP = {
const arg1 = process.argv.slice(2)[0]
const arg2 = process.argv.slice(2)[1]
const target = arg1 === '--force' || arg1 === '-f' ? arg2 : arg1
if (process.env.CI && !target) {
throw new Error('prebuild requires an explicit target triple in CI')
}
const { platform, arch } = target
? { platform: PLATFORM_MAP[target], arch: ARCH_MAP[target] }
: process