Comments (15)
Sorry, to be more specific, I see the output when the hook has finished and the commit has succeeded, but I don't see any of the output while it's in progress (like I do when I commit normally).
from cz-cli.
Hi Kent. Sorry it took me a bit to get back to you. Can you provide your pre-commit hook? In my case, I actually don't see any eslint output when I run git cz
regardless of whether it succeeds or fails. Instead am greeted with a generic, relatively unhelpful error (β Commit failed. Did you forget to 'git add' your files?) or with a generic success message (β Commit succeeded). The only scenario that running git cz will output your eslint info right now is if you have not configured commitizen in package in the current working directory. This is because by default, when commitizen is called but the current working directory repo does not have an adapter set in package.json/.czrc/.cz.js then it should completely remove itself from the scenario and revert to the normal git commit behavior.
Currently the 'user-friendly' :D default is that commitizen will try to commit, wait for the return code and then present a pretty message to the user based on the return code. This means that we're not piping the output of the command in real time. We probably could explore that scenario either by default or first behind a flag.
Again, if you have a scenario where you have a properly configured adapter in a repo and are getting actual eslint output back, I'd love to see it the pre-commit hook. Perhaps mine could be tweaked.
from cz-cli.
Try out the angular-formly repo.
- Kent C. Dodds
(Sent from my mobile device, please forgive typos or brevity)
On Aug 29, 2015 7:55 PM, "Jim Cummins" [email protected] wrote:
Hi Kent. Sorry it took me a bit to get back to you. Can you provide your
pre-commit hook? In my case, I actually don't see any eslint output when I
run git cz regardless of whether it succeeds or fails. Instead am greeted
with a generic, relatively unhelpful error (β Commit failed. Did you forget
to 'git add' your files?) or with a generic success message (β Commit
succeeded). The only scenario that running git cz will output your eslint
info right now is if you have not configured commitizen in package in the
current working directory. This is because by default, when commitizen is
called but the current working directory repo does not have an adapter set
in package.json/.czrc/.cz.js then it should completely remove itself from
the scenario and revert to the normal git commit behavior.Currently the 'user-friendly' :D default is that commitizen will try to
commit, wait for the return code and then present a pretty message to the
user based on the return code. This means that we're not piping the output
of the command in real time. We probably could explore that scenario either
by default or first behind a flag.Again, if you have a scenario where you have a properly configured adapter
in a repo and are getting actual eslint output back, I'd love to see it the
pre-commit hook. Perhaps mine could be tweaked.β
Reply to this email directly or view it on GitHub
#8 (comment).
from cz-cli.
Sorry, I misunderstood. I don't have a scenario where things are working
properly... Would love it though.
- Kent C. Dodds
(Sent from my mobile device, please forgive typos or brevity)
On Aug 29, 2015 7:57 PM, "Kent C. Dodds" [email protected] wrote:
Try out the angular-formly repo.
- Kent C. Dodds
(Sent from my mobile device, please forgive typos or brevity)
On Aug 29, 2015 7:55 PM, "Jim Cummins" [email protected] wrote:Hi Kent. Sorry it took me a bit to get back to you. Can you provide your
pre-commit hook? In my case, I actually don't see any eslint output when I
run git cz regardless of whether it succeeds or fails. Instead am
greeted with a generic, relatively unhelpful error (β Commit failed. Did
you forget to 'git add' your files?) or with a generic success message (β
Commit succeeded). The only scenario that running git cz will output your
eslint info right now is if you have not configured commitizen in package
in the current working directory. This is because by default, when
commitizen is called but the current working directory repo does not have
an adapter set in package.json/.czrc/.cz.js then it should completely
remove itself from the scenario and revert to the normal git commit
behavior.Currently the 'user-friendly' :D default is that commitizen will try to
commit, wait for the return code and then present a pretty message to the
user based on the return code. This means that we're not piping the output
of the command in real time. We probably could explore that scenario either
by default or first behind a flag.Again, if you have a scenario where you have a properly configured
adapter in a repo and are getting actual eslint output back, I'd love to
see it the pre-commit hook. Perhaps mine could be tweaked.β
Reply to this email directly or view it on GitHub
#8 (comment).
from cz-cli.
I am no longer using the pretty commit messages. Instead cz should output the raw git results. This should help with this although I'll probably have you double check it on release.
from cz-cli.
π
from cz-cli.
Ok, 2.0.2 seems to be the most stable release in the past 24 hours so we can probably check this with it. I can try it out but it might not be until tomomorrow.
from cz-cli.
You'll notice that it worked :-)
from cz-cli.
Actually... Sorry.. No, I forgot what I was looking for. The word-wrap problems have been solved, but it's still not printing out the githook output until after the scripts are finished :-(
from cz-cli.
Alright. Thanks for checking. I'll dig in for 2.1.
On Fri, Oct 16, 2015 at 10:20 AM Kent C. Dodds [email protected]
wrote:
Actually... Sorry.. No, I forgot what I was looking for. The word-wrap
problems have been solved, but it's still not printing out the githook
output until after the scripts are finished :-(β
Reply to this email directly or view it on GitHub
#8 (comment).
from cz-cli.
I just put in a PR to gulp-git. Once that lands I'll be able to get incremental githook output working. Thanks for waiting. stephenlacy/gulp-git#99
from cz-cli.
Sweet dude! π
from cz-cli.
Finally got a chance to test this out. Works perfectly! Thanks!
from cz-cli.
Glad to hear. Thanks for testing!
On Sat, Oct 24, 2015 at 12:06 AM Kent C. Dodds [email protected]
wrote:
Finally got a chance to test this out. Works perfectly! Thanks!
β
Reply to this email directly or view it on GitHub
#8 (comment).
from cz-cli.
@jimthedev Hi,
I had read your posts, and I still can not know how can i output the ghooks log to stdout ?
Can you help me ?
from cz-cli.
Related Issues (20)
- NPM warning breaks `cz` prompts when using `scripts` entry
- commitizen produces empty commit message after answering prompts HOT 3
- Showing timing (progress) during commit cli
- Text alignment issues in smaller terminal windows on Mac HOT 2
- bug: issue with LRU cache, cannot execute `git-cz`
- [Config loader] check if config key is in package.json before accepting it as a config file HOT 1
- Weird behaviour when using cz cli (global) outside a git repo
- pathspec 'git' did not match any file(s) known to git HOT 2
- Feature request: Submit on the command line: Is there a way to return to the previous field? HOT 1
- Feature request: Whether to support multiple types of commits in one submission HOT 1
- commit npm script actually works
- husky hook does not work HOT 2
- Nestor David SΓ‘nchez
- Behaves the same as git commit HOT 1
- Provide a way to prompt to amend commit message only
- cz commit error
- Question: Is it possible to write an adapter in ES6?
- Cannot create release version after creating a pre-release version
- PNPM support is broken
- PNPM support is broken HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cz-cli.