diff --git a/scripts/_common.sh b/scripts/_common.sh index fb75318..912324a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,7 +12,8 @@ YNH_COMPOSER_VERSION="1.10.17" _ynh_exec_with_drush_php() { ynh_exec_warn_less ynh_exec_as "$app" \ - env PATH="$PATH" DRUSH_PHP="/usr/bin/php$phpversion" \ + env PATH="$install_dir/.composer/vendor/bin:$PATH" \ + DRUSH_PHP="/usr/bin/php$phpversion" \ "$@" } diff --git a/scripts/install b/scripts/install index f1fa499..c17edcc 100644 --- a/scripts/install +++ b/scripts/install @@ -57,8 +57,6 @@ ynh_add_config --template="composer.json" --destination="$install_dir/.composer/ ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.composer" -export PATH="$install_dir/.composer/vendor/bin:$PATH" - #================================================= # ADD A CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a1faeec..7e8df4d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,8 +33,6 @@ ynh_script_progression --message="Upgrading Composer..." --weight=3 ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.composer" -export PATH="$install_dir/.composer/vendor/bin:$PATH" - #================================================= # UPGRADE DRUPAL #=================================================