Fixed atuin systemctl detection

This commit is contained in:
Gal Szkolnik 2025-08-04 03:48:27 +00:00
parent b9347f957e
commit a5ee5ebe88

View file

@ -241,7 +241,7 @@ records = true
## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon`
# enabled = false
{{- if eq .chezmoi.os "linux" }}
{{- $systemd_unit := output "systemctl" "--user" "is-enabled" "atuin.service" }}
{{- $systemd_unit := output "sh" "-c" "/usr/bin/systemctl --user is-enabled atuin.service 2> /dev/null || true" }}
{{- if eq $systemd_unit "enabled" }}
enabled = true
{{- end -}}