Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
af0c3b64
Unverified
Commit
af0c3b64
authored
Mar 04, 2022
by
SBado
Committed by
GitHub
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(updater): prefix `cd` with `builtin` when it is aliased (#10753)
parent
46195d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
check_for_upgrade.sh
tools/check_for_upgrade.sh
+6
-6
No files found.
tools/check_for_upgrade.sh
View file @
af0c3b64
...
...
@@ -36,11 +36,11 @@ function current_epoch() {
function
is_update_available
()
{
local
branch
branch
=
${
"
$(
cd
-q
"
$ZSH
"
;
git config
--local
oh-my-zsh.branch
)
"
:-
master
}
branch
=
${
"
$(
builtin
cd
-q
"
$ZSH
"
;
git config
--local
oh-my-zsh.branch
)
"
:-
master
}
local
remote remote_url remote_repo
remote
=
${
"
$(
cd
-q
"
$ZSH
"
;
git config
--local
oh-my-zsh.remote
)
"
:-
origin
}
remote_url
=
$(
cd
-q
"
$ZSH
"
;
git config remote.
$remote
.url
)
remote
=
${
"
$(
builtin
cd
-q
"
$ZSH
"
;
git config
--local
oh-my-zsh.remote
)
"
:-
origin
}
remote_url
=
$(
builtin
cd
-q
"
$ZSH
"
;
git config remote.
$remote
.url
)
local
repo
case
"
$remote_url
"
in
...
...
@@ -58,7 +58,7 @@ function is_update_available() {
# Get local HEAD. If this fails assume there are updates
local
local_head
local_head
=
$(
cd
-q
"
$ZSH
"
;
git rev-parse
$branch
2>/dev/null
)
||
return
0
local_head
=
$(
builtin
cd
-q
"
$ZSH
"
;
git rev-parse
$branch
2>/dev/null
)
||
return
0
# Get remote HEAD. If no suitable command is found assume there are updates
# On any other error, skip the update (connection may be down)
...
...
@@ -81,7 +81,7 @@ function is_update_available() {
# If local and remote HEADs don't match, check if there's a common ancestor
# If the merge-base call fails, $remote_head might not be downloaded so assume there are updates
local
base
base
=
$(
cd
-q
"
$ZSH
"
;
git merge-base
$local_head
$remote_head
2>/dev/null
)
||
return
0
base
=
$(
builtin
cd
-q
"
$ZSH
"
;
git merge-base
$local_head
$remote_head
2>/dev/null
)
||
return
0
# If the common ancestor ($base) is not $remote_head,
# the local HEAD is older than the remote HEAD
...
...
@@ -170,7 +170,7 @@ function has_typed_input() {
fi
# Test if Oh My Zsh directory is a git repository
if
!
(
cd
-q
"
$ZSH
"
&&
LANG
=
git rev-parse &>/dev/null
)
;
then
if
!
(
builtin
cd
-q
"
$ZSH
"
&&
LANG
=
git rev-parse &>/dev/null
)
;
then
echo
>
&2
"[oh-my-zsh] Can't update: not a git repository."
return
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment