Git Product home page Git Product logo

Comments (15)

kentcdodds avatar kentcdodds commented on August 15, 2024

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.

jimthedev avatar jimthedev commented on August 15, 2024

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.

kentcdodds avatar kentcdodds commented on August 15, 2024

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.

kentcdodds avatar kentcdodds commented on August 15, 2024

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.

jimthedev avatar jimthedev commented on August 15, 2024

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.

kentcdodds avatar kentcdodds commented on August 15, 2024

πŸ‘

from cz-cli.

jimthedev avatar jimthedev commented on August 15, 2024

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.

kentcdodds avatar kentcdodds commented on August 15, 2024

You'll notice that it worked :-)

from cz-cli.

kentcdodds avatar kentcdodds commented on August 15, 2024

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.

jimthedev avatar jimthedev commented on August 15, 2024

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.

jimthedev avatar jimthedev commented on August 15, 2024

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.

kentcdodds avatar kentcdodds commented on August 15, 2024

Sweet dude! 😎

from cz-cli.

kentcdodds avatar kentcdodds commented on August 15, 2024

Finally got a chance to test this out. Works perfectly! Thanks!

from cz-cli.

jimthedev avatar jimthedev commented on August 15, 2024

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.

linxiaowu66 avatar linxiaowu66 commented on August 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.