Improve Script Error Handling and Argument Parsing
-
Error Handling: Add error checking for each significant command to make debugging easier if something goes wrong.
-
Refactor Argument Parsing: Use a while loop with getopts for more robust and readable argument parsing
-
Improve Variable Initialization: Set default values for REPEAT directly instead of using conditional logic later.
-
Check for Command Existence: Ensure required commands like git and flutter are available.
-
Optimize Flutter Installation Check: Check if Flutter is already installed and only clone if necessary.
-
Make Path Management More Robust: Ensure the Flutter binary is added to the PATH only if it was cloned.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
-
[yes] I read the Contributor Guide and followed the process outlined there for submitting PRs.
-
[yes ] I read the Tree Hygiene wiki page, which explains my responsibilities.
-
[yes ] I read the Flutter Style Guide recently, and have followed its advice.
-
[yes ] I signed the CLA.
-
[ yes] I updated/added relevant documentation (doc comments with
///). -
[yes ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
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.
Closing this as inactive, feel free to reopen once you have time to come back to this pr