question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

commitlint does not detect input

See original GitHub issue

Expected Behavior

Currently when we have a Git hook (sh script) with only commitlint as command, it fails to fall back to COMMIT_EDITMSG.

Current Behavior

It fails with [input] is required: supply via stdin, or --env or --edit or --from and --to

Using commitlint --edit works.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Check the fallback if it works.

Steps to Reproduce (for bugs)

  1. Create a hook with only commitlint as command

Context

Your Environment

Executable Version
commitlint --version VERSION
git --version VERSION
node --version VERSION

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
indiescriptercommented, Sep 1, 2020

Many thanks @escapedcat . Reverting to @commitlint/cli & @commitlint/config-conventional v9.1.1 escaped the problem!

0reactions
escapedcatcommented, Aug 31, 2020

@indiescripter your problem might be handled in: https://github.com/conventional-changelog/commitlint/issues/2065
Because it looks like you are using the -e flag.

This issue seems to be slightly different.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commitlint not working. git commit - Stack Overflow
I get the feeling the commitlint readme may be stale or has a typo. This solution worked for me too on MacOS. Originally...
Read more >
commitlint - Lint commit messages
Lint from stdin echo 'foo: bar' | commitlint ⧗ input: foo: bar ✖ type must be ... Get help: https://github.com/conventional-changelog/commitlint/#what-is- ...
Read more >
@commitlint/config-nx-scopes - npm
Simply return a boolean to indicate whether the project should be included or not. As an example, the following code demonstrates how to...
Read more >
Commitlint: Write more organized code - LogRocket Blog
But even when we find the exact place where a bug occurs, it may not be clear what the right solution to the...
Read more >
How to lint Git commit messages with commitlint and husky
How to link Git commit message with commitlint and husky (npm package).Correction: when adding the ... Your browser can't play this video.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found