Skip to content

fix(crashlytics): quote shell interpolations in podspec to support repo paths with spaces#18230

Open
daanrun wants to merge 1 commit intofirebase:mainfrom
daanrun:fix/crashlytics-podspec-quote-paths
Open

fix(crashlytics): quote shell interpolations in podspec to support repo paths with spaces#18230
daanrun wants to merge 1 commit intofirebase:mainfrom
daanrun:fix/crashlytics-podspec-quote-paths

Conversation

@daanrun
Copy link
Copy Markdown

@daanrun daanrun commented Apr 26, 2026

Summary

The iOS and macOS firebase_crashlytics.podspec files invoke crashlytics_add_upload_symbols via system("ruby ... -p #{project_dir} ...") without quoting #{current_dir} or #{project_dir}. When either path contains a space, the shell tokenizes at the space and crashlytics_add_upload_symbols's OptParser receives a truncated -p argument, then fails with:

Project at /Users/foo/My Code/Project/Runner.xcodeproj does not exist.
Please check paths or incorporate Crashlytics upload symbols manually.

The dSYM auto-upload build phase never gets added to the Runner target, breaking Crashlytics symbolication for any developer whose repo path contains a space (common on macOS — ~/My Code/, ~/Mobile Apps/, ~/iCloud Drive/..., etc.).

Fix

Single-quote both #{current_dir} and #{project_dir} in both podspec files so the shell preserves the path verbatim:

# Before
system("ruby #{current_dir}/crashlytics_add_upload_symbols -f -p #{project_dir} -n Runner.xcodeproj")

# After
system("ruby '#{current_dir}/crashlytics_add_upload_symbols' -f -p '#{project_dir}' -n Runner.xcodeproj")

Same change in both:

  • packages/firebase_crashlytics/firebase_crashlytics/ios/firebase_crashlytics.podspec
  • packages/firebase_crashlytics/firebase_crashlytics/macos/firebase_crashlytics.podspec

Single-quotes are the safe choice here — Ruby string interpolation has already happened by the time the shell sees the command, so single-quoting the resolved value protects against shell tokenization without disabling interpolation.

Repro

  1. Clone any Flutter project using firebase_crashlytics into a directory whose absolute path contains a space, e.g. ~/My Apps/example/.
  2. cd ios && pod install (or cd macos && pod install).
  3. Observe the warning above. The Crashlytics upload-symbols build phase is not added to Runner.

Testing

  • Verified locally on macOS 14.x with firebase_crashlytics 5.2.0 from a repo path containing a space. Pre-fix: warning fires, build phase missing. Post-fix: clean install, build phase added.
  • No behavior change for paths without spaces.

Compatibility

  • No breaking changes. Single-quoting interpolated paths is a strict superset of the unquoted behavior.
  • No version bump beyond a normal Crashlytics patch release.

Related

This bug has been worked around as a local pub-cache patch by multiple Flutter developers; this PR moves that fix upstream so paths-with-spaces work for everyone out of the box.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 26, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@SelaseKay
Copy link
Copy Markdown
Contributor

Hi @daanrun, thanks for the contribution. Kindly sign the CLA.

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