Skip to content

Commit

Permalink
fix: add command before instances of git that didn't have it (#643)
Browse files Browse the repository at this point in the history
Co-authored-by: vladislav doster <[email protected]>
  • Loading branch information
kiliantyler and vladdoster authored Mar 19, 2024
1 parent 0c18fda commit 7094330
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zinit-autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
[[ $1 = -q ]] && +zi-log "{pre}[self-update]{info} updating zinit repository{msg2}" \

local nl=$'\n' escape=$'\x1b['
local current_branch=$(git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD)
local current_branch=$(command git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD)
# local current_branch='main'
local -a lines
(
Expand Down Expand Up @@ -3168,7 +3168,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
}
}

if [[ -d $local_dir/.git ]] && ( builtin cd -q $local_dir ; git show-ref --verify --quiet refs/heads/main ); then
if [[ -d $local_dir/.git ]] && ( builtin cd -q $local_dir ; command git show-ref --verify --quiet refs/heads/main ); then
local main_branch=main
else
local main_branch=master
Expand Down Expand Up @@ -3574,7 +3574,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
#
# User-action entry point.
zi::version() {
+zi-log "zinit{cmd} $(git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})"
+zi-log "zinit{cmd} $(command git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})"
return $?
} # ]]]

Expand Down

0 comments on commit 7094330

Please sign in to comment.