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
5a888ff4
Commit
5a888ff4
authored
Dec 07, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(updater): don't show changelog when running unattended update (#9495)
Fixes #9495
parent
fa1911f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
cli.zsh
lib/cli.zsh
+7
-1
functions.zsh
lib/functions.zsh
+1
-1
check_for_upgrade.sh
tools/check_for_upgrade.sh
+1
-1
upgrade.sh
tools/upgrade.sh
+6
-4
No files found.
lib/cli.zsh
View file @
5a888ff4
...
@@ -376,13 +376,19 @@ function _omz::theme::use {
...
@@ -376,13 +376,19 @@ function _omz::theme::use {
function
_omz::update
{
function
_omz::update
{
# Run update script
# Run update script
env
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
if
[[
"
$1
"
!=
--unattended
]]
;
then
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
--interactive
else
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
fi
local
ret
=
$?
local
ret
=
$?
# Update last updated file
# Update last updated file
zmodload zsh/datetime
zmodload zsh/datetime
echo
"LAST_EPOCH=
$((
EPOCHSECONDS
/
60
/
60
/
24
))
"
>!
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
echo
"LAST_EPOCH=
$((
EPOCHSECONDS
/
60
/
60
/
24
))
"
>!
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
# Remove update lock if it exists
# Remove update lock if it exists
command rm
-rf
"
$ZSH
/log/update.lock"
command rm
-rf
"
$ZSH
/log/update.lock"
# Restart the zsh session
# Restart the zsh session
if
[[
$ret
-eq
0
&&
"
$1
"
!=
--unattended
]]
;
then
if
[[
$ret
-eq
0
&&
"
$1
"
!=
--unattended
]]
;
then
# Check whether to run a login shell
# Check whether to run a login shell
...
...
lib/functions.zsh
View file @
5a888ff4
...
@@ -14,7 +14,7 @@ function upgrade_oh_my_zsh() {
...
@@ -14,7 +14,7 @@ function upgrade_oh_my_zsh() {
fi
fi
# Run update script
# Run update script
env
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
env
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
--interactive
local
ret
=
$?
local
ret
=
$?
# Update last updated file
# Update last updated file
zmodload zsh/datetime
zmodload zsh/datetime
...
...
tools/check_for_upgrade.sh
View file @
5a888ff4
...
@@ -24,7 +24,7 @@ function update_last_updated_file() {
...
@@ -24,7 +24,7 @@ function update_last_updated_file() {
}
}
function
update_ohmyzsh
()
{
function
update_ohmyzsh
()
{
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
ZSH
=
"
$ZSH
"
zsh
-f
"
$ZSH
/tools/upgrade.sh"
--interactive
update_last_updated_file
update_last_updated_file
}
}
...
...
tools/upgrade.sh
View file @
5a888ff4
...
@@ -70,10 +70,12 @@ if git pull --rebase --stat origin master; then
...
@@ -70,10 +70,12 @@ if git pull --rebase --stat origin master; then
message
=
"Hooray! Oh My Zsh has been updated!"
message
=
"Hooray! Oh My Zsh has been updated!"
# Display changelog with less if available, otherwise just print it to the terminal
# Display changelog with less if available, otherwise just print it to the terminal
if
((
$+
commands[less]
))
;
then
if
[[
"
$1
"
=
--interactive
]]
;
then
"
$ZSH
/tools/changelog.sh"
HEAD
"
$last_commit
"
--text
|
command
less
-R
if
((
$+
commands[less]
))
;
then
else
"
$ZSH
/tools/changelog.sh"
HEAD
"
$last_commit
"
--text
|
LESS
=
command
less
-R
"
$ZSH
/tools/changelog.sh"
HEAD
"
$last_commit
"
else
"
$ZSH
/tools/changelog.sh"
HEAD
"
$last_commit
"
fi
fi
fi
fi
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