Skip to content

Commit

Permalink
Merge pull request jlord#172 from Em-AK/fix-commit-to-it
Browse files Browse the repository at this point in the history
Fix `Commit to it` level, prevent the test to pass with a blank repo
  • Loading branch information
Jessica Lord committed May 31, 2015
2 parents 02f6af4 + 6c4bad4 commit ecf9943
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions problems/commit_to_it/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ var exec = require('child_process').exec

exec('git status', function(err, stdout, stdrr) {
var show = stdout.trim()

if (show.match("nothing to commit")) {

if (show.match("Initial commit")) {
console.log("Hmm, can't find\ncommitted changes.")
}
else if (show.match("nothing to commit")) {
console.log("Changes have been committed!")
}
else if (show.match("Changes not staged for commit")){
else {
console.log("Seems there are changes\nto commit still.")
} else console.log("Hmm, can't find\ncommitted changes.")
}
})

0 comments on commit ecf9943

Please sign in to comment.