Skip to content

Commit

Permalink
Fix path settings for composer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntzrbtr committed Oct 29, 2024
1 parent 6c4d780 commit b208dd4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bin/exec-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -euo pipefail

export COMPOSER_HOME="$ASDF_INSTALL_PATH/.composer"
5 changes: 5 additions & 0 deletions bin/list-bin-paths
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -euo pipefail

echo "bin .composer/vendor/bin"
5 changes: 4 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ install_composer() {
fail "Checksum checksum for Composer failed."
fi

# Verify the checksum
# Verify the checksum and move binary into place
echo "Verifying checksum..."
if $checksum_cmd -c composer.phar.sha256sum; then
mv composer.phar "$install_path/composer"
Expand All @@ -170,6 +170,9 @@ install_composer() {
fail "Checksum verification failed. The file may be corrupted or tampered with."
fi

# Create install directory for composer stuff
mkdir -p "${2%/bin}/.composer"

# Clean up: remove temporary directory
cd - && rm -rf "$temp_dir"

Expand Down

0 comments on commit b208dd4

Please sign in to comment.