diff --git a/scripts/config b/scripts/config index 79921da..a99cef8 100644 --- a/scripts/config +++ b/scripts/config @@ -72,15 +72,15 @@ set__git_branch_mode() { if [ -z "$(cd "$install_dir" && git log release..dev)" ] then # If git_branch was set to 0, switch to "release" branch - (cd "$install_dir" && git checkout release) + (cd "$install_dir" && ynh_exec_as "$app" git checkout release) ynh_print_info "Switching to \"release\" branch" else - ynh_print_err --message="\"release\" branch is behind your local \"dev\" branch, rolling back is not allowed here" - exit 0 + ynh_die --message="\"release\" branch is behind your local \"dev\" branch, rolling back is not allowed here" + exit 1 fi elif [ "$git_branch_mode" -eq "1" ]; then # If git_branch was set to 1, switch to "dev" branch - (cd "$install_dir" && git checkout dev) + (cd "$install_dir" && ynh_exec_as "$app" git checkout dev) ynh_print_info "Switching to \"dev\" branch" fi ynh_app_setting_set --app=$app --key=git_branch_mode --value="$git_branch_mode"