File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -82,20 +82,21 @@ check_for_updates() {
8282 ensure_user_file " $msg_cache "
8383
8484 (
85- local latest
85+ (
86+ local latest
8687
87- latest=$( get_latest_version_from_github)
88- if [[ -z " $latest " ]]; then
89- latest=$( get_latest_version)
90- fi
88+ latest=$( get_latest_version_from_github)
89+ if [[ -z " $latest " ]]; then
90+ latest=$( get_latest_version)
91+ fi
9192
92- if [[ -n " $latest " && " $VERSION " != " $latest " && " $( printf ' %s\n' " $VERSION " " $latest " | sort -V | head -1) " == " $VERSION " ]]; then
93- printf " \nUpdate available: %s → %s, run %smo update%s\n\n" " $VERSION " " $latest " " $GREEN " " $NC " > " $msg_cache "
94- else
95- echo -n > " $msg_cache "
96- fi
97- ) &
98- disown 2> /dev/null || true
93+ if [[ -n " $latest " && " $VERSION " != " $latest " && " $( printf ' %s\n' " $VERSION " " $latest " | sort -V | head -1) " == " $VERSION " ]]; then
94+ printf " \nUpdate available: %s → %s, run %smo update%s\n\n" " $VERSION " " $latest " " $GREEN " " $NC " > " $msg_cache "
95+ else
96+ echo -n > " $msg_cache "
97+ fi
98+ ) > /dev/null 2>&1 < /dev/null &
99+ )
99100}
100101
101102show_update_notification () {
You can’t perform that action at this time.
0 commit comments