From b266b39aee7b41cc9071e207f986e21225cb4c79 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Thu, 7 Dec 2023 07:34:45 +0000 Subject: [PATCH] Latest --- scripts/provision.sh | 2 +- scripts/src/provision.sh.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/provision.sh b/scripts/provision.sh index f0512def..e660b329 100644 --- a/scripts/provision.sh +++ b/scripts/provision.sh @@ -332,7 +332,7 @@ setupPasswordlessSudo() { logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script' if [ -n "$SUDO_EXIT_CODE" ] && [ -z "$SUDO_PASSWORD" ] && command -v chezmoi > /dev/null && [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" ]; then logg info "Acquiring SUDO_PASSWORD by using Chezmoi to decrypt ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" - SUDO_PASSWORD="$(chezmoi decrypt "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD")" + SUDO_PASSWORD="$(cat "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" | chezmoi decrypt)" export SUDO_PASSWORD fi if [ -n "$SUDO_PASSWORD" ]; then diff --git a/scripts/src/provision.sh.tmpl b/scripts/src/provision.sh.tmpl index f28fde7d..4ca60b9c 100644 --- a/scripts/src/provision.sh.tmpl +++ b/scripts/src/provision.sh.tmpl @@ -112,7 +112,7 @@ setupPasswordlessSudo() { logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script' if [ -n "$SUDO_EXIT_CODE" ] && [ -z "$SUDO_PASSWORD" ] && command -v chezmoi > /dev/null && [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" ]; then logg info "Acquiring SUDO_PASSWORD by using Chezmoi to decrypt ${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" - SUDO_PASSWORD="$(chezmoi decrypt "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD")" + SUDO_PASSWORD="$(cat "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi/home/.chezmoitemplates/secrets/SUDO_PASSWORD" | chezmoi decrypt)" export SUDO_PASSWORD fi if [ -n "$SUDO_PASSWORD" ]; then