mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
fix: resolve syntax errors in check_for_upgrade.sh when detaching from screen
- Replace echo -n with printf for better compatibility - Fix variable quoting in printf statement for ERROR variable - Resolves syntax errors: 'echo [-n] string' expected and missing quotes Fixes #13291
This commit is contained in:
parent
9e23925b85
commit
9a5e8c7efd
1 changed files with 2 additions and 2 deletions
|
|
@ -232,7 +232,7 @@ function handle_update() {
|
||||||
|
|
||||||
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
||||||
# Otherwise just show a reminder for how to update
|
# Otherwise just show a reminder for how to update
|
||||||
echo -n "[oh-my-zsh] Would you like to update? [Y/n] "
|
printf "[oh-my-zsh] Would you like to update? [Y/n] "
|
||||||
read -r -k 1 option
|
read -r -k 1 option
|
||||||
[[ "$option" = $'\n' ]] || echo
|
[[ "$option" = $'\n' ]] || echo
|
||||||
case "$option" in
|
case "$option" in
|
||||||
|
|
@ -280,7 +280,7 @@ case "$update_mode" in
|
||||||
return 0
|
return 0
|
||||||
elif [[ "$EXIT_STATUS" -ne 0 ]]; then
|
elif [[ "$EXIT_STATUS" -ne 0 ]]; then
|
||||||
print -P "\n%F{red}[oh-my-zsh] There was an error updating:%f"
|
print -P "\n%F{red}[oh-my-zsh] There was an error updating:%f"
|
||||||
printf "\n${fg[yellow]}%s${reset_color}" "$ERROR"
|
printf "\n${fg[yellow]}%s${reset_color}" "${ERROR}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} always {
|
} always {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue