toplenboren / simple-git-hooks

A simple git hooks manager for small projects
MIT License
1.3k stars 41 forks source link

Silence successful output #110

Open IlyaSemenov opened 4 months ago

IlyaSemenov commented 4 months ago

I use simple-git-hooks as the package prepare script:

{
  "scripts": {
    "prepare": "simple-git-hooks"
  },
  "simple-git-hooks": {
    "pre-commit": "npx lint-staged"
  }
}

Every time I run pnpm i, it prints the two redundant lines:

[INFO] Successfully set the pre-commit with command: npx lint-staged
[INFO] Successfully set all git hooks

I propose to silence this output (always — or better yet — when nothing has changed), same as husky doesn't print anything when it simply succeeds. Or at least add a CLI flag such as simple-git-hooks --silent.

toplenboren commented 4 months ago

Hi! Glad to see that you use this project!

I agree with you :-)

I want to add a --silent option to v2.*.* and completely make simple-git-hooks silent in next major version (along with few other changes..)