Skip to content
Merged
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
9 changes: 8 additions & 1 deletion scripts/setup.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
/* eslint-disable import-x/no-nodejs-modules */
import fs from 'fs';
import { $ } from 'execa';
import { $ as runScript } from 'execa';
import { Listr } from 'listr2';
import path from 'path';

const IS_CI = process.env.CI;
const IS_OSX = process.platform === 'darwin';

// iOS builds are enabled by default on macOS only but can be enabled or disabled explicitly
let BUILD_IOS = IS_OSX;
let IS_NODE = false;
let BUILD_ANDROID = true
let INSTALL_PODS;
let VERBOSE = IS_CI;
// GitHub CI pipeline flag - defaults to false
let GITHUB_CI = false;
const args = process.argv.slice(2) || [];
Expand All @@ -37,6 +39,9 @@ for (const arg of args) {
case '--build-on-github-ci':
GITHUB_CI = true;
continue;
case '--verbose':
VERBOSE = true;
continue;
default:
throw new Error(`Unrecognized CLI arg ${arg}`);
}
Expand All @@ -47,6 +52,7 @@ if (INSTALL_PODS === undefined) {
if (INSTALL_PODS && !BUILD_IOS) {
throw new Error('Cannot install pods if iOS setup has been skipped');
}
const $ = runScript(VERBOSE ? {stdio: 'inherit'} : undefined);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bundler stderr check breaks CI

Medium Severity

When verbose mode is on (CI by default), the shared execa helper uses stdio: 'inherit', so failed subprocesses no longer populate error.stderr. The GitHub CI bundler install path treats missing stderr as a real failure and rethrows, so an already-installed bundler can fail setup instead of being ignored.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5e5c912. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fail for me locally when bundler isn't installed 🤔 That error handling path might already be obsolete.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed here: #33218


const rendererOptions = {
collapseErrors: false,
Expand Down Expand Up @@ -384,6 +390,7 @@ const concurrentTasks = {
const tasks = new Listr([prepareDependenciesTask, concurrentTasks], {
concurrent: false,
exitOnError: true,
renderer: VERBOSE ? 'verbose' : 'default',
rendererOptions,
});

Expand Down
Loading