[input] is required: supply via stdin, or --env or --edit or --from and --to
See original GitHub issueExpected Behavior
Linter should work correctly
Current Behavior
Gives a help message
husky > pre-commit (node v14.8.0)
ℹ No staged files match any configured task.
husky > commit-msg (node v14.8.0)
@commitlint/cli@9.1.2 - Lint your commit messages
[input] reads from stdin if --edit, --env, --from and --to are omitted
...
[input] is required: supply via stdin, or --env or --edit or --from and --to
husky > commit-msg hook failed (add --no-verify to bypass)
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
Steps to Reproduce (for bugs)
Played from version @commitlint/cli@9.1.2
in version @commitlint/cli@9.1.1
works stably
.huskyrc
.huskyrc
{
"hooks": {
"commit-msg": "commitlint --extends=@commitlint/config-angular -e"
}
}
Context
Your Environment
Executable | Version |
---|---|
commitlint --version |
v9.1.2 |
git --version |
v2.25.0 |
node --version |
v14.8.0 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:16 (1 by maintainers)
Top Results From Across the Web
How to Write Good Commit Messages with Commitlint
Firstly, we need to install the commitlint CLI and add a commitlint config (in this case the default Conventional Commits Config).
Read more >How do I pass a string into subprocess.Popen (using the stdin ...
#!/usr/bin/env python3 from subprocess import run, PIPE p = run(['grep', 'f'], ... Use the input argument instead of the stdin argument, which accepts...
Read more >Package Diff: @commitlint/cli @ 7.5.2 .. 7.6.0
throw new Error(`Using format ${moduleName}, but cannot find the module. ... new Error(\n\t\t\t'[input] is required: supply via stdin, or --env or --edit or ......
Read more >docker run - Docker Documentation
The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command.
Read more >AWS CLI skeletons and input files
These templates can be generated using the generate-cli-skeleton option. ... template that are not required and for which you don't want to supply...
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 hope this helps with identifying the issue. If you explicitly specify the default value it works as expected.
An empty string works as well.
Therefore my guess is that it is somehow related to the switch from meow to yargs. Maybe yargs handles default arguments a little different.
I just updated some of my repos and can confirm that it works again. Thanks a lot.