Skip to content

Commit 9833cd3

Browse files
committed
Revert "chore(scripts): support sappling in project_root"
This reverts commit 6855735. This was pushed accidentally.
1 parent 6855735 commit 9833cd3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

scripts/lib.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,7 @@ realpath() {
4141
# We have to define realpath before these otherwise it fails on Mac's bash.
4242
SCRIPT="${BASH_SOURCE[1]:-${BASH_SOURCE[0]}}"
4343
SCRIPT_DIR="$(realpath "$(dirname "$SCRIPT")")"
44-
45-
function project_root {
46-
dir=$(pwd)
47-
48-
while [[ "$dir" != "" && ! -e "$dir/.git" && ! -e "$dir/.sl" ]]; do
49-
dir=${dir%/*}
50-
done
51-
52-
echo "$dir"
53-
}
54-
PROJECT_ROOT="$(cd "$SCRIPT_DIR" && realpath "$(project_root)")"
44+
PROJECT_ROOT="$(cd "$SCRIPT_DIR" && realpath "$(git rev-parse --show-toplevel)")"
5545

5646
# pushd is a silent alternative to the real pushd shell command.
5747
pushd() {

0 commit comments

Comments
 (0)