-
My goal is to have a script execute only if the OS is Darwin and My
When I test the template, it looks good.
Yet, That file begins with What I am doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The problem here is that Note also this line: |
Beta Was this translation helpful? Give feedback.
The problem here is that
.installMacApps
in the first line of the file is not defined when you runchezmoi init
for the first time.Note also this line:
{{- $installMacApps := eq (promptString "Install Mac applications (y/n)") "y" -}}
is incorrect. The
:=
creates a new$installMacApps
variable that is scoped within theif
statement. You need:{{- $installMacApps = eq (promptString "Install Mac applications (y/n)") "y" -}}
instead. Note the
:=
is replaced with=
: this modifies the existing$installMacApps
variable.