From 7dd977e7b646ab11966eaa7ebea12bbe7e53bf71 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 5 Dec 2022 04:14:44 +0000 Subject: [PATCH] Update .local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl --- .../dot_local/bin/executable_provision.tmpl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl b/.local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl index f7eff056..91b9baea 100644 --- a/.local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl +++ b/.local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl @@ -222,12 +222,6 @@ if command -v glow > /dev/null; then glow "$HOME/.local/share/chezmoi/docs/CHEZMOI-INTRO.md" fi -### Chezmoi -if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then - logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present' - chezmoi init -fi - ### Prompt for variables if command -v gum > /dev/null; then if [ -z "$SOFTWARE_GROUP" ]; then @@ -236,6 +230,16 @@ if command -v gum > /dev/null; then fi fi +### Run chezmoi init +if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then + logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present' + chezmoi init +fi + ### Run chezmoi apply logg info 'Running `chezmoi apply`' -chezmoi apply +if [ -n "$FORCE_CHEZMOI" ]; then + chezmoi apply --force +else + chezmoi apply +fi