Skip to content

Commit 08fdfb5

Browse files
committed
fix(chezmoi): pipe deferred apply through tee to stay visible in terminal
When debug=true, chezmoi apply was fully swallowed into the log file, making postCreate appear to hang with no output. Use tee -a so output goes to both terminal and log. Bumps version to 1.9.4.
1 parent 305c3e0 commit 08fdfb5

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/chezmoi/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chezmoi",
33
"id": "chezmoi",
4-
"version": "1.9.3",
4+
"version": "1.9.4",
55
"description": "Install chezmoi",
66
"documentationURL": "https://github.com/ckagerer/devcontainer-features/tree/main/src/chezmoi",
77
"options": {

src/chezmoi/install.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,9 @@ fi
209209
# The /nix named volume is mounted at this point, so the Nix store persists.
210210
if [[ "${DEFER_SCRIPTS}" == "true" ]]; then
211211
if [[ "${DEBUG}" == "true" ]]; then
212-
{
213-
printf '\n-- chezmoi apply --include=scripts --\n'
214-
# shellcheck disable=SC2086
215-
chezmoi apply --include=scripts ${EXTRA_ARGS} 2>&1
216-
} >> "${CHEZMOI_POSTCREATE_LOG}"
212+
printf '\n-- chezmoi apply --include=scripts --\n' >> "${CHEZMOI_POSTCREATE_LOG}"
213+
# shellcheck disable=SC2086
214+
chezmoi apply --include=scripts ${EXTRA_ARGS} 2>&1 | tee -a "${CHEZMOI_POSTCREATE_LOG}"
217215
else
218216
# shellcheck disable=SC2086
219217
chezmoi apply --include=scripts ${EXTRA_ARGS}

0 commit comments

Comments
 (0)