-
-
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
Fix uncommitted code error. #303
Fix uncommitted code error. #303
Conversation
@@ -2,8 +2,8 @@ module ReactOnRails | |||
module GitUtils | |||
def self.uncommitted_changes?(message_handler) | |||
return false if ENV["COVERAGE"] | |||
status = `git status` | |||
return false if status.include?("nothing to commit, working directory clean") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmatyukov Sweet!
@robwise CC
Reviewed 1 of 1 files at r1. Comments from the review on Reviewable.io |
@nmatyukov Can you please rebase this on top of master. Then I'll have the auto-merge button. |
ec4e673
to
b62c255
Compare
@justin808 Branch was rebased. |
Thanks @nmatyukov! |
@@ -2,8 +2,8 @@ module ReactOnRails | |||
module GitUtils | |||
def self.uncommitted_changes?(message_handler) | |||
return false if ENV["COVERAGE"] | |||
status = `git status` | |||
return false if status.include?("nothing to commit, working directory clean") | |||
status = `git status --porcelain` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work if I have untracked files
$ git status --porcelain
?? .byebug_history
?? .gitignore
?? .idea/
?? .rspec
?? .rubocop.yml
?? .ruby-gemset
?? .ruby-version
When I tried to install react_on_rails, I got "ERROR: You have uncommitted code. Please commit or stash your changes before continuing." but all of my code were committed.
The problem was in the git localization: "нечего фиксировать, рабочая директория пуста" instead of "nothing to commit, working directory clean" (but both are the same).
Here is the fix that checks on empty git status if no uncommitted changes.