Fix path discrepancy in bats tests

This commit is contained in:
Matt Cengia 2026-05-13 22:20:34 +10:00
parent f26412eeae
commit 8c8d1559e6
No known key found for this signature in database

View file

@ -24,11 +24,11 @@ get_file_uri() {
local commit_hash=
commit_hash=$(git rev-parse HEAD)
if [ "$mode" = 'github' ]; then
REPLY="https://github.com/tj/git-extras/blob/$commit_hash/${filename}"
REPLY="https://github.com/tj/git-extras/blob/$commit_hash/${filename#./}"
elif [ "$mode" = 'gitlab' ]; then
REPLY="https://gitlab.com/tj/git-extras/-/blob/${commit_hash}/${filename}"
REPLY="https://gitlab.com/tj/git-extras/-/blob/${commit_hash}/${filename#./}"
elif [ "$mode" = 'bitbucket' ]; then
REPLY="https://bitbucket.org/tj/git-extras/src/${commit_hash}/${filename}"
REPLY="https://bitbucket.org/tj/git-extras/src/${commit_hash}/${filename#./}"
fi
}