From 9c00efb981639d1a3af3af0db2b9b78ec2f5d134 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 7 Nov 2024 19:46:46 -0600 Subject: [PATCH] Fix privateDomain required multiple times, use promptStringOnce --- home/.chezmoi.toml.tmpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index ad19147..bfefb2a 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -33,6 +33,8 @@ {{- $wsl = (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}} {{- end -}} +{{ $privateDomain := promptStringOnce . "privateDomain" "What is the private domain" }} + [merge] command = "bash" args = [ @@ -41,9 +43,9 @@ args = [ ] [data] - privateDomain = "{{ promptString "Enter the private domain" }}" - chassis = "{{ $chassisType }}" - wsl = {{ $wsl }} + privateDomain = {{ $privateDomain | quote }} + chassis = {{ $chassisType | quote }} + wsl = {{ $wsl | quote }} [data.cpu] cores = {{ $cpuCores }}