Skip to content

Commit

Permalink
fix: handle non-systemd environments for chassisType
Browse files Browse the repository at this point in the history
  • Loading branch information
yacoob committed Dec 8, 2024
1 parent 8d1c008 commit 563f078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion home/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ merge:
- "{{"{{"}} .Source {{"}}"}}"
- "{{"{{"}} .Target {{"}}"}}"
data:
chassisType: {{ (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
chassisType: {{ if lookPath "hostnamectl" }}{{ (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}{{ else }}unknown{{ end }}

0 comments on commit 563f078

Please sign in to comment.