Skip to content

Makes run_plugin_action_in_current_directory resilient to missing subdirectories#6976

Merged
JayShortway merged 2 commits into
mainfrom
cursor/fix-paywall-submodule-pr-automation-7727
Jun 11, 2026
Merged

Makes run_plugin_action_in_current_directory resilient to missing subdirectories#6976
JayShortway merged 2 commits into
mainfrom
cursor/fix-paywall-submodule-pr-automation-7727

Conversation

@JayShortway

@JayShortway JayShortway commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

iOS equivalent of RevenueCat/purchases-android#3585. The bug currently doesn't surface in iOS because its ./fastlane directory contains an actions/ subdirectory, but the bug does exist.

Open in Web Open in Cursor 

Note

Low Risk
Small Fastlane-only change with no SDK or runtime impact; only affects CI lanes that use this helper when cwd lacks subdirectories.

Overview
Updates run_plugin_action_in_current_directory in fastlane/Fastfile so Fastlane plugin actions still run when the current directory has no subfolders.

Previously the helper always chdir'd into Dir["*/"].first, which crashes if that glob is empty. It now runs the block in place when there is no first subdirectory, and only uses the subdirectory trick when one exists (same Fastlane directory quirk as before).

Reviewed by Cursor Bugbot for commit 427d522. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 2 commits June 11, 2026 10:50
…irectories

run_plugin_action_in_current_directory raised "undefined method 'chomp'
for nil:NilClass" whenever the current working directory had no
subdirectories. iOS does not currently hit this because its ./fastlane
directory contains an actions/ subdirectory, but the helper is identical
to the one that broke purchases-android's submodule update automation
(RevenueCat/purchases-android#3585), where the commit and push succeed
but PR creation crashes.

Fall back to running the plugin action directly when there is no
subdirectory to switch into, which is correct when the working directory
is ./fastlane (Fastlane already runs plugin actions from the repo root).

Co-authored-by: joop <joop@revenuecat.com>
@JayShortway JayShortway changed the title Make run_plugin_action_in_current_directory resilient to missing subdirectories Makes run_plugin_action_in_current_directory resilient to missing subdirectories Jun 11, 2026
@JayShortway JayShortway self-assigned this Jun 11, 2026
@JayShortway JayShortway requested review from a team June 11, 2026 10:54
@JayShortway JayShortway marked this pull request as ready for review June 11, 2026 10:55
@JayShortway JayShortway requested a review from a team as a code owner June 11, 2026 10:55
@JayShortway JayShortway enabled auto-merge (squash) June 11, 2026 10:56

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for fixing this! 🙌

@JayShortway JayShortway merged commit cf7d415 into main Jun 11, 2026
19 of 21 checks passed
@JayShortway JayShortway deleted the cursor/fix-paywall-submodule-pr-automation-7727 branch June 11, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants