Support bash 3 in local builds #514
Open
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.
Why
When testing an android app with maestro, the bash script that's generated relies the globstar option. This is only available on bash 4 or higher but mac os only comes with bash 3 (and will probably never move to bash 4 or 5 because they use the gplv3 license). Because of this if you run
eas -p android --localon a mac the build will fail with this error (if the build runs maestro):Here's a screenshot of the logs I see when I try to build locally on mac:
How
To resolve this and support bash 3 I've refactored the maestro test code to use
findrather than globstar, which should make it possible to run local builds on mac.This screenshot is the same section of the build as before but using this branch:
Test Plan
To test this you will need an eas build that runs maestro tests and has an android configuration.