commit not aborting
See original GitHub issueHey, I hae the following test - setup: ./package.json
{
"name": "guppy-test",
"devDependencies": {
"git-guppy": "^1.2.1",
"gulp": "^3.9.1",
"gulp-task-loader": "^1.2.1",
"guppy-pre-commit": "^0.3.0"
}
}
./gulpfile.js
var gulp = require('gulp');
require('gulp-task-loader')('hooks_gulp-tasks');
gulp.task('pre-commit', ['rejector']);
./hooks_gulp-tasks/rejector.js
var gulp = require('gulp');
var guppy = require('git-guppy')(gulp);
module.exports = function () {
console.log("Nope, I'm rejecting ", guppy.src('pre-commit'), '!');
return 1;
};
But every commit is just passing and completing without any trace of the return 1
.
Versions:
λ node --version
v6.3.0
λ npm --version
3.10.3
λ gulp --version
[16:33:54] CLI version 1.2.1
[16:33:54] Local version 3.9.1
λ git --version
git version 2.9.0.windows.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Aborting commit due to empty commit message - Stack Overflow
The reason is that git doesn't allow commit without messages. You have to associate some messages with your commit command. Share.
Read more >doesn't abort commit if user doesn't modify the template ...
What steps will reproduce the problem? set a template commit message; try doing a commit; click "Commit" without modifying the message.
Read more >Git - git-commit Documentation
If the user exits the editor without editing the message, the commit is aborted. This has no effect when a message is given...
Read more >Gcommit does not abort commit message if prepare ... - GitHub
Hi,. I have prepare-commit-msg and commit-msg hooks active. This simply messes up Gcommit. ... Which works fine. Ticket numbers are prepended to ...
Read more >Why can't you abort a git commit amend? - Reddit
Git aborts the commit if the message is empty. When amending you already have a message. Hence if you want to abort the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would just use the gulp-util error method.
Oh… Sorry, my bad, I totally forgot about the streams.
(Do you know about a better way in gulp to error correctly for this use-case than
PluginError
fromgulp-util
or would that be fitting?)