Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ynh_check_app_version_changed behavior #756

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions data/helpers.d/utils
Expand Up @@ -83,8 +83,12 @@ ynh_exit_properly () {
#
# Requires YunoHost version 2.6.4 or higher.
ynh_abort_if_errors () {
set -eu # Exit if a command fail, and if a variable is used unset.
trap ynh_exit_properly EXIT # Capturing exit signals on shell script
# Exit if a command fail, and if a variable is used unset.
set -eu
# Communicate set -e to command substitutions and commands executed in a sub‐shell environment.
set -o errtrace
# Capturing exit signals on shell script
trap ynh_exit_properly EXIT
}

# Download, check integrity, uncompress and patch the source from app.src
Expand Down Expand Up @@ -507,7 +511,8 @@ ynh_check_app_version_changed () {
then
ynh_print_info --message="Upgrade forced for package check."
else
ynh_die "Up-to-date, nothing to do" 0
ynh_print_info -m "Up-to-date, nothing to do"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-m => --message= to respect the same syntax of this helper

return_value="UP_TO_DATE"
fi
elif [ "$current_upstream_version" == "$update_upstream_version" ] ; then
# Upstream versions are the same, only YunoHost package versions differ
Expand Down