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
36f444ed
Unverified
Commit
36f444ed
authored
Jul 08, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(update): fix error exit code on update check (#10033)
This patch removes the 'exit 1' status code when the update check finishes or is ended with CTRL+C. Fixes #10033
parent
c44b99e9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
check_for_upgrade.sh
tools/check_for_upgrade.sh
+6
-3
No files found.
tools/check_for_upgrade.sh
View file @
36f444ed
...
...
@@ -48,14 +48,17 @@ function update_ohmyzsh() {
return
fi
# Remove lock directory on exit. `return
1
` is important for when trapping a SIGINT:
# Remove lock directory on exit. `return
$ret
` is important for when trapping a SIGINT:
# The return status from the function is handled specially. If it is zero, the signal is
# assumed to have been handled, and execution continues normally. Otherwise, the shell
# will behave as interrupted except that the return status of the trap is retained.
# This means that for a CTRL+C, the trap needs to return the same exit status so that
# the shell actually exits what it's running.
trap
"
unset -f current_epoch update_last_updated_file update_ohmyzsh
ret=
\$
?
unset -f current_epoch update_last_updated_file update_ohmyzsh 2>/dev/null
command rm -rf '
$ZSH
/log/update.lock'
return 1
return
\$
ret
"
EXIT INT QUIT
# Create or update .zsh-update file if missing or malformed
...
...
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