Change directories to project root before calculating classpath.
This commit is contained in:
parent
a8d7e8903b
commit
b8b9b6c685
1 changed files with 10 additions and 10 deletions
20
bin/lein
20
bin/lein
|
@ -20,6 +20,16 @@ if [ $USER = "root" ] && [ "$LEIN_ROOT" == "" ]; then
|
|||
read
|
||||
fi
|
||||
|
||||
ORIGINAL_PWD=$PWD
|
||||
while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ ! $NOT_FOUND ]
|
||||
do
|
||||
cd ..
|
||||
if [ "$(dirname "$PWD")" == "/" ]; then
|
||||
NOT_FOUND=0
|
||||
cd "$ORIGINAL_PWD"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$LEIN_HOME" = "" ]; then
|
||||
LEIN_HOME="$HOME/.lein"
|
||||
fi
|
||||
|
@ -49,16 +59,6 @@ while [ -h "$SCRIPT" ] ; do
|
|||
fi
|
||||
done
|
||||
|
||||
ORIGINAL_PWD=$PWD
|
||||
while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ ! $NOT_FOUND ]
|
||||
do
|
||||
cd ..
|
||||
if [ "$(dirname "$PWD")" == "/" ]; then
|
||||
NOT_FOUND=0
|
||||
cd "$ORIGINAL_PWD"
|
||||
fi
|
||||
done
|
||||
|
||||
BIN_DIR="$(dirname "$SCRIPT")"
|
||||
|
||||
if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then
|
||||
|
|
Loading…
Reference in a new issue