Improve comments of ynh_spawn_app_shell

This commit is contained in:
tituspijean 2023-05-30 11:27:33 +00:00
parent db7ab2a98b
commit f3faac87f8
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -166,12 +166,15 @@ ynh_spawn_app_shell() {
local service=$(ynh_app_setting_get --app=$app --key=service) local service=$(ynh_app_setting_get --app=$app --key=service)
[ -z "$service" ] && service=$app; [ -z "$service" ] && service=$app;
# Export HOME variable
export HOME=$install_dir;
# Load the Environment variables from the app's service # Load the Environment variables from the app's service
local env_var=$(systemctl show $service.service -p "Environment" --value) local env_var=$(systemctl show $service.service -p "Environment" --value)
[ -n "$env_var" ] && export $env_var; [ -n "$env_var" ] && export $env_var;
export HOME=$install_dir;
# Force `php` to its intended version # Force `php` to its intended version
# We use `eval`+`export` since `alias` is not propagated to subshells, even with `export`
local phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) local phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
if [ -n "$phpversion" ] if [ -n "$phpversion" ]
then then