mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Made installer install current branch and not master
This commit is contained in:
parent
adecf4c368
commit
eab7ff26cf
1 changed files with 8 additions and 1 deletions
|
|
@ -61,7 +61,14 @@ main() {
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
env git clone --depth=1 $(git remote get-url origin) $ZSH || {
|
||||
|
||||
branch="$(env git symbolic-ref --short HEAD)"
|
||||
if [[ "$?" != "0" ]] || [[ "$branch" == "" ]]; then
|
||||
printf "Error: failed to get current git branch\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
env git clone --depth=1 $(git remote get-url origin) -b "$branch" $ZSH || {
|
||||
printf "Error: git clone of oh-my-zsh repo failed\n"
|
||||
exit 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue