feat(lib)!: soft-deprecate `upgrade_oh_my_zsh` function for everybody
BREAKING CHANGE: the `upgrade_oh_my_zsh` function now calls `omz update` directly.
Diff
1diff --git a/lib/functions.zsh b/lib/functions.zsh
2index 0fc7580701615b216bef058067b29624e7358660..7beb62ad935f61f055769130861e952f0cfb83bd 100644
3--- a/lib/functions.zsh
4+++ b/lib/functions.zsh
5@@ -9,23 +9,8 @@ function uninstall_oh_my_zsh() {
6 }
7 8 function upgrade_oh_my_zsh() {
9- if (( $+functions[_omz::update] )); then
10- echo >&2 "${fg[yellow]}Note: \`$0\` is deprecated. Use \`omz update\` instead.$reset_color"
11- fi
12-
13- # Run update script
14- env ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive
15- local ret=$?
16- # Update last updated file
17- zmodload zsh/datetime
18- echo "LAST_EPOCH=$(( EPOCHSECONDS / 60 / 60 / 24 ))" >! "${ZSH_CACHE_DIR}/.zsh-update"
19- # Remove update lock if it exists
20- command rm -rf "$ZSH/log/update.lock"
21- # Restart the zsh session
22- if [[ $ret -eq 0 ]]; then
23- # Check whether to run a login shell
24- [[ "$ZSH_ARGZERO" = -* ]] && exec -l "${ZSH_ARGZERO#-}" || exec "$ZSH_ARGZERO"
25- fi
26+ echo >&2 "${fg[yellow]}Note: \`$0\` is deprecated. Use \`omz update\` instead.$reset_color"
27+ omz update
28 }
2930 function take() {