mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
hide read-only mode skips from human and JSON probe output
This commit is contained in:
Generated
+1
@@ -727,6 +727,7 @@ dependencies = [
|
||||
"nostr-sdk",
|
||||
"regex",
|
||||
"reqwest 0.11.27",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
|
||||
@@ -55,6 +55,12 @@ impl ProbeReport {
|
||||
|
||||
for check in &self.checks {
|
||||
if check.skipped {
|
||||
// Don't list checks skipped due to read-only mode — they are
|
||||
// not applicable, not failures. Only show skips caused by
|
||||
// earlier check failures so the user can see the causal chain.
|
||||
if check.error.as_deref() == Some("read-only mode") {
|
||||
continue;
|
||||
}
|
||||
let reason = check.error.as_deref().unwrap_or("skipped");
|
||||
println!(
|
||||
"{}→{} {:<28} skipped {}({}){} ",
|
||||
@@ -103,7 +109,18 @@ impl ProbeReport {
|
||||
|
||||
/// Print machine-readable JSON
|
||||
pub fn print_json(&self) {
|
||||
println!("{}", serde_json::to_string_pretty(self).unwrap());
|
||||
// Exclude checks skipped due to read-only mode — they are not
|
||||
// applicable and would clutter automated consumers.
|
||||
let filtered = ProbeReport {
|
||||
checks: self
|
||||
.checks
|
||||
.iter()
|
||||
.filter(|c| !(c.skipped && c.error.as_deref() == Some("read-only mode")))
|
||||
.cloned()
|
||||
.collect(),
|
||||
..self.clone()
|
||||
};
|
||||
println!("{}", serde_json::to_string_pretty(&filtered).unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Submodule
+1
Submodule worktrees/b905-deletion-request-support added at 6d18f8e022
+1
Submodule worktrees/bb46-git-http-protocol-test-suite added at b62231dc30
Submodule worktrees/ec1f-administrator-observability-and-management-strategy added at a1c89b41e2
Reference in New Issue
Block a user