summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sc2
-rwxr-xr-xmill10
2 files changed, 6 insertions, 6 deletions
diff --git a/build.sc b/build.sc
index ce02aa95..ed0a838c 100755
--- a/build.sc
+++ b/build.sc
@@ -456,7 +456,7 @@ def launcherScript(shellJvmArgs: Seq[String],
if (millBootstrapString == "") ""
else {
val cutCount = millBootstrapGrepPrefix.length + 1
- s"""if [ -f "$$PWD/mill" ] ; then
+ s"""if [ -f "mill" ] ; then
| if [ -z "$$MILL_EXEC_PATH" ] ; then
| MILL_VERSION=$$(grep -F "$millBootstrapGrepPrefix" "$$PWD/mill" | cut -c $cutCount-)
| ${millBootstrapStringValue.replace("\n", "\n ")}
diff --git a/mill b/mill
index a9d2a29f..3d073df4 100755
--- a/mill
+++ b/mill
@@ -7,12 +7,12 @@ DEFAULT_MILL_VERSION=0.4.2
set -e
-if [ -f ".mill-version" ] ; then
- MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
-fi
-
if [ -z "$MILL_VERSION" ] ; then
- MILL_VERSION=$DEFAULT_MILL_VERSION
+ if [ -f ".mill-version" ] ; then
+ MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
+ else
+ MILL_VERSION=$DEFAULT_MILL_VERSION
+ fi
fi
MILL_DOWNLOAD_PATH="$HOME/.mill/download"