From 90c437cb7342516278fa9d346144471c0f0ac8ab Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Tue, 30 Jan 2024 21:24:48 +0000 Subject: [PATCH] updated perl_cpanm_install.sh --- perl/perl_cpanm_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl/perl_cpanm_install.sh b/perl/perl_cpanm_install.sh index ec32a58a..15afc7cb 100755 --- a/perl/perl_cpanm_install.sh +++ b/perl/perl_cpanm_install.sh @@ -123,13 +123,15 @@ if [ -n "${NO_FAIL:-}" ]; then echo "$sudo $envopts $CPANM --notest $opts $cpan_module" # want splitting of opts # shellcheck disable=SC2086 - $sudo $envopts "$CPANM" --notest $opts "$cpan_module" || : + # 'env' prevent a command not found error if sudo isn't used from the space OPENSSL_INCLUDE="$brew_prefix/opt/openssl/include" prefix + env $sudo $envopts "$CPANM" --notest $opts "$cpan_module" || : done else echo "$sudo $envopts $CPANM --notest $opts $cpan_modules" # want splitting of opts and modules # shellcheck disable=SC2086 - if ! $sudo $envopts "$CPANM" --notest $opts $cpan_modules; then + # 'env' prevent a command not found error if sudo isn't used from the space OPENSSL_INCLUDE="$brew_prefix/opt/openssl/include" prefix + if ! env $sudo $envopts "$CPANM" --notest $opts $cpan_modules; then echo echo "reading latest cpanm build.log for details:" echo