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

Cargo home #28

Merged
merged 3 commits into from
Dec 31, 2024
Merged
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
37 changes: 29 additions & 8 deletions .github/actions/basics/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,39 @@ runs:
cargo binstall --no-confirm lychee prefligit ripgrep
cargo binstall --no-confirm --locked taplo-cli

- name: Debug cargo bin path
- name: Debug installed binaries
shell: bash
run: |
echo "PATH is: $PATH"
echo "CARGO_HOME is: $CARGO_HOME"
echo "Contents of $CARGO_HOME/bin:"
ls -l "$CARGO_HOME/bin" || echo "$CARGO_HOME/bin does not exist."
echo "Using ripgrep to find any prefligit files in $CARGO_HOME:"
rg prefligit "$CARGO_HOME" || echo "No prefligit found in $CARGO_HOME"

# Finally, try to run prefligit
prefligit --version

echo
echo "==== Searching each PATH directory for 'prefligit' or 'rg' ===="
IFS=':' read -ra PATH_ARRAY <<< "$PATH"
for dir in "${PATH_ARRAY[@]}"; do
echo "-> Checking $dir"
# Only list if directory actually exists (some paths may not exist)
if [ -d "$dir" ]; then
ls -1 "$dir" | grep -E '^(prefligit|rg)$' || true
else
echo " (Not a directory)"
fi
done

echo
echo "==== Checking 'which' output for 'prefligit' or 'rg' ===="
which prefligit || echo "'prefligit' not found by 'which'"
which rg || echo "'rg' not found by 'which'"

echo
echo "==== Brute-force searching /home/runner for 'prefligit' and 'rg' ===="
# Use 'find' instead of 'rg', since 'rg' is missing
echo "Searching for prefligit..."
find /home/runner -name prefligit 2>/dev/null || echo "No prefligit found."

echo
echo "Searching for rg..."
find /home/runner -name rg 2>/dev/null || echo "No rg found."

- uses: ./.github/actions/elapsed-time
with:
Expand Down
Loading