Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix finding composer cache dir #233

Merged
merged 4 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/composer_paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ ! -f "${composer_lock}" ]; then
fi

composer_version="$($composer_path --version)"
cache_dir="$($composer_path config cache-dir)"
cache_dir="$($composer_path --working-dir="${working_directory}" config cache-dir)"

echo "::debug::Composer path is '${composer_path}'"
echo "::debug::${composer_version}"
Expand Down
15 changes: 15 additions & 0 deletions tests/expect/composer_paths_10.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env -S expect -f

set timeout 3
# So we don't find a composer.lock in current dir
cd ..
spawn ../bin/composer_paths.sh "" "fixtures/with-lock-file"
match_max 100000

expect "::debug::Composer path is '*'\r
::debug::Composer version *\r
::debug::Composer cache directory found at '*composer*'\r
::debug::File composer.json found at 'fixtures/with-lock-file/composer.json'\r
::debug::File composer.lock path computed as 'fixtures/with-lock-file/composer.lock'\r
"
expect eof