From 4792af35d5016d67d20540a1508cf24b911e3456 Mon Sep 17 00:00:00 2001 From: Ben Periton <104396+benperiton@users.noreply.github.com> Date: Fri, 12 Aug 2022 17:45:23 +0100 Subject: [PATCH] Update exec-env Similar to the issue over on the ruby plugin (https://github.com/asdf-community/asdf-direnv/issues/115) if using direnv and have `strict_env = true` then it fails to load with `./exec-env:5: COMPOSER_HOME: unbound variable` --- bin/exec-env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/exec-env b/bin/exec-env index 012fc6f..c808d64 100755 --- a/bin/exec-env +++ b/bin/exec-env @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Set so that direnv and strict_env = true doesn't complain about unbound variable +COMPOSER_HOME=${COMPOSER_HOME:-} + # Set Composer's home directory if it's not set. if [ "$ASDF_INSTALL_VERSION" != "system" ]; then if [ -z "$COMPOSER_HOME" ]; then