Fix Bash detection for ynh_load_app_environment

This commit is contained in:
tituspijean 2023-05-18 16:45:17 +00:00
parent 425670bcfb
commit 072dabaf70
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -127,7 +127,7 @@ ynh_load_app_environment() {
ynh_handle_getopts_args "$@" ynh_handle_getopts_args "$@"
# Force Bash to be used to run this helper # Force Bash to be used to run this helper
if [ $0 != "bash" ] if [[ ! $0 =~ \/?bash$ ]]
then then
ynh_print_err --message="Please use Bash as shell" ynh_print_err --message="Please use Bash as shell"
exit 1 exit 1