ynh_install_composer: use either final_path or install_dir depending on packaging format

This commit is contained in:
Alexandre Aubin 2023-02-06 17:47:03 +01:00 committed by GitHub
parent b06a3053f6
commit cb505b578b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -516,7 +516,11 @@ ynh_install_composer() {
local composerversion local composerversion
# Manage arguments with getopts # Manage arguments with getopts
ynh_handle_getopts_args "$@" ynh_handle_getopts_args "$@"
workdir="${workdir:-$install_dir}" if dpkg --compare-versions ${YNH_APP_PACKAGING_FORMAT:-0} lt 2; then
workdir="${workdir:-$final_path}"
else
workdir="${workdir:-$install_dir}"
fi
phpversion="${phpversion:-$YNH_PHP_VERSION}" phpversion="${phpversion:-$YNH_PHP_VERSION}"
install_args="${install_args:-}" install_args="${install_args:-}"
composerversion="${composerversion:-$YNH_COMPOSER_VERSION}" composerversion="${composerversion:-$YNH_COMPOSER_VERSION}"