Revert "chore(scripts): support sappling in project_root"

This reverts commit 6855735085.

This was pushed accidentally.
This commit is contained in:
Ammar Bandukwala 2023-07-23 19:40:28 +00:00
parent 6855735085
commit 9833cd32b3
1 changed files with 1 additions and 11 deletions

View File

@ -41,17 +41,7 @@ realpath() {
# We have to define realpath before these otherwise it fails on Mac's bash.
SCRIPT="${BASH_SOURCE[1]:-${BASH_SOURCE[0]}}"
SCRIPT_DIR="$(realpath "$(dirname "$SCRIPT")")"
function project_root {
dir=$(pwd)
while [[ "$dir" != "" && ! -e "$dir/.git" && ! -e "$dir/.sl" ]]; do
dir=${dir%/*}
done
echo "$dir"
}
PROJECT_ROOT="$(cd "$SCRIPT_DIR" && realpath "$(project_root)")"
PROJECT_ROOT="$(cd "$SCRIPT_DIR" && realpath "$(git rev-parse --show-toplevel)")"
# pushd is a silent alternative to the real pushd shell command.
pushd() {