Makes run_plugin_action_in_current_directory resilient to missing subdirectories#6976
Merged
JayShortway merged 2 commits intoJun 11, 2026
Merged
Conversation
…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>
run_plugin_action_in_current_directory resilient to missing subdirectories
ajpallares
approved these changes
Jun 11, 2026
ajpallares
left a comment
Member
There was a problem hiding this comment.
Thank you for fixing this! 🙌
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
iOS equivalent of RevenueCat/purchases-android#3585. The bug currently doesn't surface in iOS because its
./fastlanedirectory contains anactions/subdirectory, but the bug does exist.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_directoryinfastlane/Fastfileso Fastlane plugin actions still run when the current directory has no subfolders.Previously the helper always
chdir'd intoDir["*/"].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.