1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00

Fix php version with a dummy path bin dir

This commit is contained in:
Salamandar 2024-03-24 13:32:37 +01:00
parent ffb2adf335
commit 5c5da60c0d
3 changed files with 9 additions and 2 deletions

View file

@ -10,6 +10,13 @@ YNH_COMPOSER_VERSION="2.4.3"
# PERSONAL HELPERS
#=================================================
_fix_php_version() {
mkdir -p "$install_dir/phppath"
ln -s "/usr/bin/php$phpversion" "$install_dir/phppath/php"
PATH="$install_dir/phppath:$PATH" "$@"
ynh_secure_remove --file="$install_dir/phppath"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -37,7 +37,7 @@ ynh_script_progression --message="Building Movim..."
ynh_install_composer
COMPOSER_ALLOW_SUPERUSER=1 ynh_composer_exec --commands="install --no-dev"
COMPOSER_ALLOW_SUPERUSER=1 ynh_composer_exec --commands="movim:migrate"
COMPOSER_ALLOW_SUPERUSER=1 _fix_php_version ynh_composer_exec --commands="movim:migrate"
chown -R "$app:www-data" "$install_dir"

View file

@ -44,7 +44,7 @@ ynh_exec_warn_less ynh_install_composer
ynh_exec_warn_less COMPOSER_ALLOW_SUPERUSER=1 ynh_composer_exec --commands="config --global discard-changes true --quiet"
ynh_exec_warn_less COMPOSER_ALLOW_SUPERUSER=1 ynh_composer_exec --commands="update --no-interaction --quiet"
ynh_exec_warn_less COMPOSER_ALLOW_SUPERUSER=1 ynh_composer_exec --commands="movim:migrate --quiet"
ynh_exec_warn_less COMPOSER_ALLOW_SUPERUSER=1 _fix_php_version ynh_composer_exec --commands="movim:migrate --quiet"
chown -R "$app:www-data" "$install_dir"