Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/windows/AutoOS.ClaudeAutostart.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Get-AutoOSClaudeDefaults {
foreach ($p in $block.PSObject.Properties) { $table[$p.Name] = $p.Value }
if ($table.Count -gt 0) { return $table }
}
} catch { }
} catch { $_ | Out-Null }
}
@{
enabled = $true; snapshot_interval_mins = 5; liveness_window_mins = 240
Expand Down Expand Up @@ -272,7 +272,7 @@ function Get-AutoOSClaudeState {
sessions = @($doc.sessions)
}
}
} catch { }
} catch { $_ | Out-Null }
}
[pscustomobject]@{ version = $script:StateVersion; captured_at = 0; captured_at_iso = $null; sessions = @() }
}
Expand Down
4 changes: 2 additions & 2 deletions lib/windows/AutoOS.Detect.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function Get-AutoOSWingetPackageProcess {
$process = [Diagnostics.Process]::Start($psi)
# Close stdin so a prompt that slipped past --disable-interactivity reads
# EOF and gives up, instead of sitting there until the timeout.
try { $process.StandardInput.Close() } catch { }
try { $process.StandardInput.Close() } catch { $_ | Out-Null }
$process
} catch { $null }
}
Expand All @@ -144,7 +144,7 @@ function Get-AutoOSWingetPackageResult {
$Process.Kill()
}
} catch { $packages = @() }
finally { try { $Process.Dispose() } catch { } }
finally { try { $Process.Dispose() } catch { $_ | Out-Null } }
$packages
}

Expand Down
4 changes: 2 additions & 2 deletions lib/windows/AutoOS.Serve.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function Get-AutoOSExampleBlock {
try {
$block = (Get-Content -LiteralPath $path -Raw -Encoding UTF8 | ConvertFrom-Json).$Name
if ($block) { return $block }
} catch { }
} catch { $_ | Out-Null }
@{}
}

Expand All @@ -286,7 +286,7 @@ function Get-AutoOSDetectedAnswers {
try {
$value = (& git config --global $pair.Setting 2>$null | Select-Object -First 1)
if ($value) { $answers[$pair.Key] = [string]$value }
} catch { }
} catch { $_ | Out-Null }
}
$answers
}
Expand Down
11 changes: 8 additions & 3 deletions tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,9 @@ if it "every component has a homepage link"; then
import json, glob
bad = []
for p in sorted(glob.glob("catalog/*.json")):
for grp in json.load(open(p, encoding="utf-8")).get("categories", []):
with open(p, encoding="utf-8") as f:
data = json.load(f)
for grp in data.get("categories", []):
for c in grp.get("components", []):
if not c.get("homepage"):
bad.append(p + ":" + c["id"])
Expand Down Expand Up @@ -745,7 +747,8 @@ if it "the dependency graph the UI draws has no orphan requirements"; then
import json, glob
bad = []
for p in sorted(glob.glob("catalog/*.json")):
d = json.load(open(p, encoding="utf-8"))
with open(p, encoding="utf-8") as f:
d = json.load(f)
ids = {c["id"] for g in d.get("categories", []) for c in g.get("components", [])}
for g in d.get("categories", []):
for c in g.get("components", []):
Expand Down Expand Up @@ -881,7 +884,9 @@ import json, glob, collections
have = collections.defaultdict(set)
for p in glob.glob("catalog/*.json"):
plat = p.replace("catalog", "").strip("/\\").replace(".json", "")
for g in json.load(open(p, encoding="utf-8"))["categories"]:
with open(p, encoding="utf-8") as f:
data = json.load(f)
for g in data["categories"]:
for c in g["components"]:
have[c["id"]].add(plat)
core = ["claude-code", "git", "nodejs", "docker", "tailscale",
Expand Down