Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
6ef236dd
Unverified
Commit
6ef236dd
authored
Apr 01, 2023
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(updater): search for upstream remote if using non-conventional name (#11135)
Fixes #11135
parent
029a6d2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
upgrade.sh
tools/upgrade.sh
+16
-8
No files found.
tools/upgrade.sh
View file @
6ef236dd
#!/usr/bin/env zsh
local
ret
=
0
# exit code
# Protect against running with shells other than zsh
if
[
-z
"
$ZSH_VERSION
"
]
;
then
exec
zsh
"
$0
"
"
$@
"
...
...
@@ -181,17 +183,23 @@ fi
# Update upstream remote to ohmyzsh org
git remote
-v
|
while
read
remote url extra
;
do
case
"
$url
"
in
git://github.com/robbyrussell/oh-my-zsh
(
|
.git
)
)
# Update out-of-date "unauthenticated git protocol on port 9418" to https
git remote set-url
"
$remote
"
"https://github.com/ohmyzsh/ohmyzsh.git"
;;
https://github.com/robbyrussell/oh-my-zsh
(
|
.git
)
)
git remote set-url
"
$remote
"
"https://github.com/ohmyzsh/ohmyzsh.git"
break
;;
git remote set-url
"
$remote
"
"https://github.com/ohmyzsh/ohmyzsh.git"
;;
git@github.com:robbyrussell/oh-my-zsh
(
|
.git
)
)
git remote set-url
"
$remote
"
"git@github.com:ohmyzsh/ohmyzsh.git"
break
;;
# Update out-of-date "unauthenticated git protocol on port 9418" to https
git://github.com/robbyrussell/oh-my-zsh
(
|
.git
)
)
git remote set-url
"
$remote
"
"https://github.com/ohmyzsh/ohmyzsh.git"
break
;;
git remote set-url
"
$remote
"
"git@github.com:ohmyzsh/ohmyzsh.git"
;;
https://github.com/ohmyzsh/ohmyzsh
(
|
.git
)
)
;;
git@github.com:ohmyzsh/ohmyzsh
(
|
.git
)
)
;;
*
)
continue
;;
esac
# If we reach this point we have found the proper ohmyzsh upstream remote. If we don't,
# we'll only update from the set remote if `oh-my-zsh.remote` has been set to a remote,
# as when installing from a fork.
git config
--local
oh-my-zsh.remote
"
$remote
"
break
done
# Set git-config values known to fix git errors
...
...
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