Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6855735 commit 9833cd3Copy full SHA for 9833cd3
scripts/lib.sh
@@ -41,17 +41,7 @@ realpath() {
41
# We have to define realpath before these otherwise it fails on Mac's bash.
42
SCRIPT="${BASH_SOURCE[1]:-${BASH_SOURCE[0]}}"
43
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)")"
+PROJECT_ROOT="$(cd "$SCRIPT_DIR" && realpath "$(git rev-parse --show-toplevel)")"
55
56
# pushd is a silent alternative to the real pushd shell command.
57
pushd() {
0 commit comments