diff --git a/.claude/scripts/run-onboarding-diagnostic.sh b/.claude/scripts/run-onboarding-diagnostic.sh index 13c60ea..10a80a2 100644 --- a/.claude/scripts/run-onboarding-diagnostic.sh +++ b/.claude/scripts/run-onboarding-diagnostic.sh @@ -415,21 +415,21 @@ echo "$DIAG_JSON" | jq '.' > "$JSON_PATH" "- **Pending reboot:** " + (($f.pending_reboot // false)|tostring) + "\n" + "- **Installed software count:** " + (($f.installed_software_count // 0)|tostring) + "\n" + "- **Scheduled tasks (non-MS, enabled):** " + (($f.scheduled_tasks_count // 0)|tostring) + "\n" + - "- **Local administrators:** " + (($f.local_administrators // []) | join(", ")) + "- **Local administrators:** " + (($f.local_administrators | if type=="array" then . elif .==null then [] else [.] end) | join(", ")) ' echo "" echo "### Fixed volumes" echo "" echo "$DIAG_JSON" | jq -r ' - (.facts.volumes // []) | .[] | + (.facts.volumes | if type=="array" then . elif .==null then [] else [.] end) | .[] | "- " + (.drive // "?") + " - " + ((.free_gb // 0)|tostring) + " GB free of " + ((.size_gb // 0)|tostring) + " GB (" + ((.free_pct // 0)|tostring) + "%)" ' echo "" echo "### Network adapters" echo "" echo "$DIAG_JSON" | jq -r ' - (.facts.network_adapters // []) | .[] | - "- " + (.description // "?") + " - IP: " + ((.ip // []) | join(", ")) + " - DNS: " + ((.dns // []) | join(", ")) + " - DHCP: " + ((.dhcp // false)|tostring) + (.facts.network_adapters | if type=="array" then . elif .==null then [] else [.] end) | .[] | + "- " + (.description // "?") + " - IP: " + ((.ip | if type=="array" then . elif .==null then [] else [.] end) | join(", ")) + " - DNS: " + ((.dns | if type=="array" then . elif .==null then [] else [.] end) | join(", ")) + " - DHCP: " + ((.dhcp // false)|tostring) ' echo "" @@ -504,15 +504,15 @@ echo "$DIAG_JSON" | jq '.' > "$JSON_PATH" SW_ADDED="$(jq -n \ --slurpfile cur "$JSON_PATH" \ --slurpfile old "$PRIOR_JSON" ' - ((($old[0].facts.installed_software // []) | map(.name)) | unique) as $o | - ((($cur[0].facts.installed_software // []) | map(.name)) | unique) as $c | + ((($old[0].facts.installed_software | if type=="array" then . elif .==null then [] else [.] end) | map(.name)) | unique) as $o | + ((($cur[0].facts.installed_software | if type=="array" then . elif .==null then [] else [.] end) | map(.name)) | unique) as $c | [ $c[] | select(. as $n | ($o | index($n)) | not) ] ')" SW_REMOVED="$(jq -n \ --slurpfile cur "$JSON_PATH" \ --slurpfile old "$PRIOR_JSON" ' - ((($old[0].facts.installed_software // []) | map(.name)) | unique) as $o | - ((($cur[0].facts.installed_software // []) | map(.name)) | unique) as $c | + ((($old[0].facts.installed_software | if type=="array" then . elif .==null then [] else [.] end) | map(.name)) | unique) as $o | + ((($cur[0].facts.installed_software | if type=="array" then . elif .==null then [] else [.] end) | map(.name)) | unique) as $c | [ $o[] | select(. as $n | ($c | index($n)) | not) ] ')"