From 176c2cdea46c3bb7331370516dc56b4e6b9c7b06 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Sat, 13 Feb 2010 09:27:29 -0800 Subject: [PATCH] Only show repl warning when running in a project dir. Standalone repls don't care. --- bin/lein | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/lein b/bin/lein index f3fb62b0..1ef5d8e3 100755 --- a/bin/lein +++ b/bin/lein @@ -64,11 +64,13 @@ if type -p curl >/dev/null 2>&1; then fi if [ "$1" = "repl" ]; then - echo "Warning: the repl task currently doesn't honor some project.clj" - echo "options due to I/O stream issues. Future versions will address" - echo "this, but for now you will get more consistent behaviour from repls" - echo "launched by either the lein-swank plugin or the lein-nailgun plugin." - echo + if [ -r project.clj ]; then + echo "Warning: the repl task currently doesn't honor some project.clj" + echo "options due to I/O stream issues. Future versions will address" + echo "this, but for now you will get more consistent behaviour from repls" + echo "launched by either the lein-swank plugin or the lein-nailgun plugin." + echo + fi $RLWRAP java -client $JAVA_OPTS -cp "src/:classes/:$CLASSPATH" jline.ConsoleRunner clojure.main ${@:2} elif [ "$1" = "self-install" ]; then if [[ $VERSION == *SNAPSHOT ]]; then