From cb505b578bcab8060d4d9731da55923752f37e08 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 6 Feb 2023 17:47:03 +0100 Subject: [PATCH] ynh_install_composer: use either final_path or install_dir depending on packaging format --- helpers/php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helpers/php b/helpers/php index 8fff8d78b..eb21a6b5c 100644 --- a/helpers/php +++ b/helpers/php @@ -516,7 +516,11 @@ ynh_install_composer() { local composerversion # Manage arguments with getopts 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}" install_args="${install_args:-}" composerversion="${composerversion:-$YNH_COMPOSER_VERSION}"