use readlink instead of other thing
parent
161c924ef1
commit
262463b5f4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue