From a55a6fd96c7af92ee284d93ee3357181e8b10769 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 May 2021 12:11:45 +0200 Subject: [PATCH] Fix php for yarn --- scripts/install | 4 ++++ scripts/upgrade | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index 0e554b5..06b170d 100755 --- a/scripts/install +++ b/scripts/install @@ -176,6 +176,8 @@ ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$f #================================================= ynh_script_progression --message="Deploying..." +update-alternatives --set php /usr/bin/php$phpversion + pushd "$final_path" ynh_use_nodejs yarn install @@ -197,6 +199,8 @@ pushd "$final_path" php$phpversion artisan config:clear popd +update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} + #================================================= # STORE THE CONFIG FILE CHECKSUM #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8ff79c2..aa5ac43 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -196,6 +196,8 @@ ynh_add_config --template="../conf/.env" --destination="$config" #================================================= ynh_script_progression --message="Deploying..." +update-alternatives --set php /usr/bin/php$phpversion + pushd "$final_path" ynh_use_nodejs yarn install @@ -241,6 +243,8 @@ if ynh_version_gt "2.15.0" "${previous_version}" ; then popd fi +update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} + #================================================= # STORE THE CONFIG FILE CHECKSUM #=================================================