Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 11, 2025

The CI linter workflow was failing with /bin/sh: 1: bundle: not found when running cd ios && bundle exec pod install. This occurred because the ESLint job runs yarn bootstrap-linux, which triggers the example's postinstall script that requires Bundler to execute pod install.

Changes Made

Added two steps to the ESLint job in .github/workflows/linter.yml:

  1. Install Bundler: sudo gem install bundler - Ensures the bundle command is available
  2. Install gems: cd example && sudo bundle install - Installs Ruby dependencies including cocoapods

These steps are placed before the existing "Install example" step that runs yarn bootstrap-linux.

Root Cause

The example's package.json includes a postinstall script:

"postinstall": "cd ios && bundle exec pod install"

When yarn bootstrap-linux runs yarn in the example directory, this postinstall script executes but fails because:

  1. Bundler is not installed on the ubuntu-latest runner
  2. The required gems (including cocoapods) are not available

Testing

Verified locally that:

  • The bundle: not found error is resolved
  • ESLint linting completes successfully
  • The workflow steps execute in the correct order

This fix ensures the linter workflow can complete without the Bundler dependency error while maintaining all existing functionality.

This pull request was created as a result of the following prompt from Copilot chat.

The CI workflow for 'Linter' in teslamotors/react-native-camera-kit fails due to a missing Bundler when running cd ios && bundle exec pod install. The error is /bin/sh: 1: bundle: not found, indicating that Bundler is not installed on the runner. To resolve this, add a step to install Bundler before running the pod install step in the workflow. Example fix:

  • name: Install Bundler
    run: gem install bundler

Add this step before the pod install step in .github/workflows/linter.yml.

Ref: 186d9c9.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…step

Co-authored-by: scarlac <895369+scarlac@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI workflow failure by installing Bundler before pod install Fix missing Bundler in CI linter workflow causing pod install failures Sep 11, 2025
Copilot AI requested a review from scarlac September 11, 2025 19:39
@scarlac scarlac marked this pull request as ready for review September 11, 2025 22:10
@scarlac scarlac merged commit ca3da0b into master Sep 11, 2025
2 of 4 checks passed
@scarlac scarlac deleted the copilot/fix-85b06957-deab-4669-81b3-b03de9e140ec branch September 11, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants