From 6bef28a59bcfe3850f8d31d6eeaffdba5c251050 Mon Sep 17 00:00:00 2001 From: killa Date: Sat, 2 Apr 2022 00:40:13 +0800 Subject: [PATCH] fix: cargo metadata with large project (#1117) Set `maxBuffer` to 10mb, cargo metadata may output data more than 1mb(the nodejs default value). Refs: - https://github.com/napi-rs/napi-rs/issues/1116 --- cli/src/build.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/src/build.ts b/cli/src/build.ts index 12c8cfd0..e1f6ee4d 100644 --- a/cli/src/build.ts +++ b/cli/src/build.ts @@ -213,6 +213,7 @@ export class BuildCommand extends Command { const cargoMetadata = JSON.parse( execSync('cargo metadata --format-version 1', { stdio: 'pipe', + maxBuffer: 1024 * 1024 * 10, }).toString('utf8'), ) const packages = cargoMetadata.packages