From 1c1ad4a91f3671164420cb2cf1080deb9bca1cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Jul 2024 15:57:31 +0200 Subject: [PATCH] Update _common.sh --- scripts/_common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1cb5feb..ae6eb5a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,12 @@ YNH_COMPOSER_VERSION="2.7.7" wb_conf="$install_dir/app/config/parameters.yml" +# Define a function to execute commands with `php_exec` +php_exec() { + (cd "$install_dir" && ynh_exec_as "$app" \ + php${phpversion} "$install_dir/bin/console" --no-interaction --env=prod "$@") +} + #================================================= # PERSONAL HELPERS #=================================================