-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update #uncommitted_changes? to handle missing Git #889
Conversation
So for this I worked under the assumption that when Git wasn't installed there were definitely "uncommitted changes" and thus |
see my question thanks! Reviewed 3 of 3 files at r1. lib/react_on_rails/git_utils.rb, line 8 at r1 (raw file):
Is the status nil if git is not installed? spec/react_on_rails/git_utils_spec.rb, line 7 at r1 (raw file):
Is there a test for the case of git is not installed? Comments from Reviewable |
f1cea95
to
f479898
Compare
Thanks, replied and updated. Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. lib/react_on_rails/git_utils.rb, line 8 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…
I've updated the code to explicitly look at the exit status of the command because I was seeing inconsistency on the return value of a command that was not found. So if exit status is 0 (successful) we can look at the result. Otherwise spec/react_on_rails/git_utils_spec.rb, line 7 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…
Yes it's the third context. I've updated the description to be more explicit. Comments from Reviewable |
46f5c5c
to
c87d783
Compare
- Fix for GitUtils.uncommitted_changes? throwing an error when called in an environment that does not have git installed - Add tests for GitUtils.uncommitted_changes? scenariors - Fixes shakacode#888
@justin808 Looks like there was a ReadTimeout on one of the Travis builds, could somebody rebuild it? |
I'd say we get more "direct" and check if git is installed. Reviewed 3 of 3 files at r2. lib/react_on_rails/git_utils.rb, line 12 at r2 (raw file):
If you don't have git installed, isn't this error message misleading? @jasonblalock spec/react_on_rails/git_utils_spec.rb, line 47 at r2 (raw file):
this message is misleading if git is not installed Comments from Reviewable |
So we already were checking if Git was installed via Review status: 1 of 3 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. lib/react_on_rails/git_utils.rb, line 12 at r2 (raw file): Previously, justin808 (Justin Gordon) wrote…
Updated error messaging to indicate if Git is not installed Comments from Reviewable |
Review status: 1 of 3 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. spec/react_on_rails/git_utils_spec.rb, line 47 at r2 (raw file): Previously, justin808 (Justin Gordon) wrote…
Fixed Comments from Reviewable |
202c54a
to
4dfe76a
Compare
Updated with explicit messaging for git not being installed @justin808 |
Thanks @jasonblalock Reviewed 2 of 2 files at r3. Comments from Reviewable |
an environment that does not have git installed
This change is