Skip to content

Commit

Permalink
Overwrite noclobber for autoupdate log (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
jandamm authored Oct 20, 2022
1 parent 9e5b39c commit 86f3681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/zgenom-autoupdate
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ -s "$ZGEN_SOURCE/.last_autoupdate_log" ]]; then
printf '\n%s\n--------\n' 'Last zgenom autoupdate log:'
printf '%s\n' "${(@f)$(<$ZGEN_SOURCE/.last_autoupdate_log)}"
printf '--------\n'
printf '' > "$ZGEN_SOURCE/.last_autoupdate_log"
printf '' >| "$ZGEN_SOURCE/.last_autoupdate_log"
}

# A precmd hook is needed since some terminals swallow output of shell startup.
Expand Down Expand Up @@ -82,7 +82,7 @@ function zgenom-autoupdate() {
&& printf 'Recreating init.zsh\n\n' \
&& _ZGENOM_JUST_INIT=1 zsh -c $cmd 2>&1
)
[[ -n $log ]] && printf '%s\n\n' $log > "$ZGEN_SOURCE/.last_autoupdate_log"
[[ -n $log ]] && printf '%s\n\n' $log >| "$ZGEN_SOURCE/.last_autoupdate_log"
) &!
}

Expand Down

0 comments on commit 86f3681

Please sign in to comment.