From b49952e0744b142eaf9ab787e9ac92eb0fa18c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 3 Mar 2024 14:53:14 +0100 Subject: [PATCH] all composer commands need workdir --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 68b88f0..89e2587 100644 --- a/scripts/install +++ b/scripts/install @@ -39,12 +39,12 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Installing $app with Composer..." --weight=30 pushd "$install_dir/sources" - ynh_install_composer --install_args="--no-dev" --workdir="$install_dir/sources" + ynh_install_composer --workdir="$install_dir/sources" --install_args="--no-dev" ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install --pure-lockfile --prod ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn run buildall - ynh_composer_exec --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" + ynh_composer_exec --workdir="$install_dir/sources" --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" ynh_secure_remove node_modules ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean diff --git a/scripts/upgrade b/scripts/upgrade index 8abde41..d6af6d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,12 +46,12 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Building $app with Composer..." --weight=30 pushd "$install_dir/sources" - ynh_install_composer --install_args="--no-dev" --workdir="$install_dir/sources" + ynh_install_composer --workdir="$install_dir/sources" --install_args="--no-dev" ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install --pure-lockfile --prod ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn run buildall - ynh_composer_exec --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" + ynh_composer_exec --workdir="$install_dir/sources" --commands="install --prefer-dist --no-cache --no-progress --no-dev -a" ynh_secure_remove node_modules ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean