mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge pull request #651 from YunoHost-Apps/filter-boring-occ-warnings
Filter boring occ warnings during upgrade
This commit is contained in:
commit
077361e7bd
1 changed files with 9 additions and 1 deletions
|
@ -32,6 +32,14 @@ fi
|
|||
# VERSION TO THE NEXT ONE
|
||||
#=================================================
|
||||
|
||||
filter_boring_occ_warnings() {
|
||||
# Filter stupid and boring messages such as the progress bar looking like:
|
||||
# 3/3 [============================] 100% Starting ...
|
||||
# and being pretty much useless, as well as the annoying warning about "only a limited number of commands" etc...
|
||||
|
||||
sed -E 's@\s*([0-9]+\/[0-9]+\s+\[(-|>|=)+\]\s+[0-9]+%|\s*Starting ...|Nextcloud or one of the apps require upgrade - only a limited number of commands are available|You may use your browser or the occ upgrade command to do the upgrade)@@g'
|
||||
}
|
||||
|
||||
# Define a function to execute commands with `occ`
|
||||
exec_occ() {
|
||||
# Backward compatibility to upgrade from older versions
|
||||
|
@ -58,7 +66,7 @@ exec_occ() {
|
|||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
fi
|
||||
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") 2> >(filter_boring_occ_warnings >&2)
|
||||
}
|
||||
|
||||
# Define a function to add an external storage
|
||||
|
|
Loading…
Add table
Reference in a new issue