Closed gagbo closed 1 year ago
I believe that you want to change this:
{{/* boolean feature tags */}}
{{- $email := promptStringOnce . "email" "What is the email address ?" -}}
{{- $handleEmail := promptBoolOnce . "flags.email" "Does this machine synchronize email (y/n) ?" -}}
{{- $useFish := promptBoolOnce . "flags.fish" "Does this machine use Fish as a shell (y/n) ?" -}}
{{- "" -}}
[data]
email = {{ $email | quote }}
osid = {{ $osid | quote }}
chassisType = {{ $chassisType | quote }}
flags.email = {{ $handleEmail }}
flags.fish = {{ $useFish }}
Or rename flags.email
to handleEmail
and flags.fish
to useFish
.
I could be wrong.
Oh right, I thought from reading the doc that the "path" in prompt*Once
was mentioning variable names, not path in chezmoi data
.
Changing the path to flags.foo
works indeed thanks
Describe the bug
I have a list of "feature tags" that get prompted once during
chezmoi init
, 1 string and 2 booleansWhenever I run
chezmoi init
additional times, I get prompted for the booleans againTo reproduce
promptBoolOnce
in the chezmoi.toml.tmpl using a prompt without default value, such as{{- $handleEmail := promptBoolOnce . "handleEmail" "Does this machine synchronize email (y/n) ?" -}}
chezmoi init
to store a value in the boolchezmoi init
againExpected behavior
The boolean is not queried again.
Output of command with the
--verbose
flagNo output, but I do get the
Does this machine synchronize email (y/n) ?
prompt again (it cleans itself up once I answer)Output of
chezmoi doctor
Additional context
In this case I run on Apple Silicon M1, but I also have this issue on my Fedora machine