Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving output depsite --quiet flag #1205

Closed
aguirrealvaro opened this issue Aug 20, 2022 · 2 comments · Fixed by #1355
Closed

Receiving output depsite --quiet flag #1205

aguirrealvaro opened this issue Aug 20, 2022 · 2 comments · Fixed by #1355

Comments

@aguirrealvaro
Copy link

aguirrealvaro commented Aug 20, 2022

I am running lint-staged --no-stash --quiet with the quiet flag but anyway i am receiving

‼ Skipping backup because --no-stash was used.

Is there any way to prevent this output on console?

.husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit

package scripts:

"prepare": "husky install",
"pre-commit": "lint-staged --no-stash --quiet"

Thanks

@EightArmCode
Copy link

I don't work on this package, but I think you need to change npm run pre-commit to npm run lint-staged

@iiroj
Copy link
Member

iiroj commented Nov 7, 2023

This should probably check for !quiet:

lint-staged/lib/runAll.js

Lines 111 to 113 in 21aeeb5

if (!ctx.shouldBackup) {
logger.warn(skippingBackup(hasInitialCommit, diff))
}

looks like there is other logging as well that should check for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants