use readlink instead of other thing

master
XWasHere 2023-10-30 19:54:32 -04:00
parent 161c924ef1
commit 262463b5f4
Signed by: XWasHere
GPG Key ID: 042F8BFA1B0EF93B
1 changed files with 2 additions and 2 deletions

View File

@ -26,14 +26,14 @@ function () {
# search for git dir
local found=false;
local dir="$(realpath "$(pwd)")";
local dir="$(readlink -f "$(pwd)")";
while [[ "$dir" != "/" ]]; do
if [[ -d "$dir/.git" ]]; then
found=true;
break;
fi;
dir="$(realpath "$dir/..")";
dir="$(readlink -f "$dir/..")";
done;
# handle git repo