fix: make --quiet and --silent flags work across all commands#782
fix: make --quiet and --silent flags work across all commands#782
Conversation
There was a problem hiding this comment.
Code Review
This pull request standardizes output suppression by migrating println! calls to info! logs in several commands, updating flag documentation, and adding integration tests. A review comment suggests replacing explicit output guards in src/hook.rs with info! calls to improve consistency with the rest of the PR's logging strategy.
17f7bf8 to
ac1f982
Compare
Greptile SummaryThis PR makes Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CLI args parsed] --> B{--verbose?}
B -->|yes| C[ProgressOutput::Text\nLogLevel::Debug or Trace]
B -->|no| D{--quiet?}
D -->|yes| E[ProgressOutput::Quiet\nLogLevel::Warn]
D -->|no| F{--silent?}
F -->|yes| G[ProgressOutput::Quiet\nLogLevel::Error]
F -->|no| H{non-TTY or\n--no-progress?}
H -->|yes| I[ProgressOutput::Text]
H -->|no| J[ProgressOutput::Animated]
E --> K[stats returns early\noutput_by_step skipped\ninfo! suppressed]
G --> L[stats returns early\noutput_by_step skipped\ninfo! + warn! suppressed]
I --> M[Normal text output]
J --> M
Reviews (6): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
b90ba90 to
c49009c
Compare
|
- Add ProgressOutput::Quiet variant to clx to suppress all progress output (spinners, status lines, text-mode updates) - Use ProgressOutput::Quiet instead of ProgressOutput::Text for --quiet/--silent - Replace direct println!() with info!() in install, init, and migrate commands so output is controlled by log level filtering - Guard stats() and step output summary with quiet/silent settings checks - Update help text and settings docs to accurately describe behavior - Add integration tests for quiet/silent on install, check, and init Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3074e53 to
e05bf2e
Compare
Summary
println!()withinfo!()ininstall,init, andmigratecommands so output respects log level filteringProgressOutput::Quiet(new clx variant) instead ofProgressOutput::Textfor--quiet/--silent, fully suppressingprogress output
stats()and step output summary with quiet/silent settings checks--quiet/--silenthelp text andsettings.tomldocs to accurately describe behaviorDepends on jdx/clx#80
Test plan
mise run build— compiles cleanmise run test:cargo— all tests passmise run test:bats test/quiet_silent.bats— 5/5 pass across all 3 variants (libgit2, nolibgit2, nogit)hk install --quiet/--silent— no outputhk check --quiet/--silent— no progress or info outputhk init --force --quiet— no outputhk version— still prints (output IS the purpose)