Fix init process - reducing assumptions

Tato revize je obsažena v:
Lockszmith (@crater) 2025-03-12 14:17:55 +00:00
rodič 9a15113955
revize 6c93527142
4 změněných souborů, kde bylo provedeno 6 přidání a 3 odebrání

Zobrazit soubor

@ -15,7 +15,8 @@
{{- $chassisType = "desktop" }}
{{- end }}
{{- else if eq .chezmoi.os "linux" }}
{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
# $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
{{- $chassisType = "server" }}
{{- else if eq .chezmoi.os "windows" }}
{{- $sysType = "windows" }}
{{- $chassisType = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "if ((Get-CimInstance -Class Win32_Battery | Measure-Object).Count -gt 0) { Write-Output 'laptop' } else { Write-Output 'desktop' }") | trim }}