Skip to content

Commit

Permalink
Update exec-env
Browse files Browse the repository at this point in the history
Similar to the issue over on the ruby plugin (asdf-community/asdf-direnv#115) if using direnv and have `strict_env = true` then it fails to load with `./exec-env:5: COMPOSER_HOME: unbound variable`
  • Loading branch information
benperiton authored Aug 12, 2022
1 parent 4d6388b commit 4792af3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/exec-env
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4792af3

Please sign in to comment.