Skip to content

Commit b208dd4

Browse files
committed
Fix path settings for composer.
1 parent 6c4d780 commit b208dd4

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

bin/exec-env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
export COMPOSER_HOME="$ASDF_INSTALL_PATH/.composer"

bin/list-bin-paths

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
echo "bin .composer/vendor/bin"

lib/utils.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ install_composer() {
161161
fail "Checksum checksum for Composer failed."
162162
fi
163163

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

173+
# Create install directory for composer stuff
174+
mkdir -p "${2%/bin}/.composer"
175+
173176
# Clean up: remove temporary directory
174177
cd - && rm -rf "$temp_dir"
175178

0 commit comments

Comments
 (0)