Revives update-paywall-templates workflow#3585
Merged
JayShortway merged 2 commits intoJun 11, 2026
Merged
Conversation
… PR creation run_plugin_action_in_current_directory raised "undefined method 'chomp' for nil:NilClass" whenever the current working directory had no subdirectories (the ./fastlane directory). This silently broke the update_paywall_preview_resources_submodule lane after #2858: the commit and push succeeded, but PR creation crashed, so the submodule was never updated on main while the recurring branch kept accumulating commits. 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>
ajpallares
approved these changes
Jun 11, 2026
ajpallares
left a comment
Member
There was a problem hiding this comment.
Thanks for the fix! I think the same fix is needed in iOS?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3585 +/- ##
=======================================
Coverage 80.35% 80.35%
=======================================
Files 377 377
Lines 15417 15417
Branches 2140 2140
=======================================
Hits 12389 12389
Misses 2171 2171
Partials 857 857 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
@ajpallares You're right! The bug doesn't surface in iOS because it has a subdirectory, but the bug is there. |
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
The
update_paywall_preview_resources_submodulelane has been failing since November, meaning thepaywall-preview-resourcessubmodule didn't get updated. Here's the latest failure.Cause
This broke in #2858 when I added
run_plugin_action_in_current_directory. This crashes when the directory has no subdirectories.Fix
Make
run_plugin_action_in_current_directoryfall back to running the action directly when there are no subdirectories.Note
Low Risk
Small defensive change to CI-only Fastlane directory workaround; no app or SDK runtime impact.
Overview
Fixes
run_plugin_action_in_current_directoryin the Fastfile so automated lanes no longer crash when the current working directory has no subdirectories.Previously the helper always called
Dir["*/"].first.chomp("/"), which raisedNoMethodErrorwhen.firstwasnil—breaking CI jobs such asupdate_paywall_preview_resources_submodule(and the update-paywall-templates workflow) since November.The change stores the first subdirectory in a variable and, if it is missing, invokes the block in place instead of
chdiring; otherwise behavior is unchanged. A comment about the old limitation was removed.Reviewed by Cursor Bugbot for commit 8b2dfea. Bugbot is set up for automated code reviews on this repo. Configure here.