fix: add maxBuffer to execSync calls to prevent Gradle crash

Gradle outputs 10-50MB of text. Default Node.js maxBuffer is 1MB.
Without this, execSync crashes the process instead of throwing.
This commit is contained in:
Zebratic committed 2026-03-15 16:13:04 +00:00
1 parent 9c1932be71
commit 8c6f405888
1 file changed
+2 -1
+2 -1
View File
@@ -252,7 +252,7 @@ async function runBuild({ buildId, files, appName, packageName, version }) {
try {
execSync("npx expo prebuild --platform android --no-install", {
cwd: projectDir,
stdio: "pipe",
stdio: "pipe", maxBuffer: 50 * 1024 * 1024,
timeout: 120000,
env: { ...process.env, CI: "1", EXPO_NO_TELEMETRY: "1" }
});
@@ -305,6 +305,7 @@ subprojects {
cwd: androidDir,
stdio: "pipe",
timeout: 600000, // 10 min max
maxBuffer: 100 * 1024 * 1024, // 100MB — Gradle is verbose
env: { ...process.env, ANDROID_HOME: "/opt/android-sdk", JAVA_HOME: "/usr/lib/jvm/java-17-openjdk-amd64", NODE_ENV: "production" }
});