diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-17 18:35:23 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-17 18:35:23 -0800 |
commit | 059fe1e763504c37527a8ca5206bf9319e88355b (patch) | |
tree | 22e092477464f9c472383af9431a9663cea320fa | |
parent | aa58cc6d5195f1ce688e53e5cb21576ec7854434 (diff) | |
download | mill-059fe1e763504c37527a8ca5206bf9319e88355b.tar.gz mill-059fe1e763504c37527a8ca5206bf9319e88355b.tar.bz2 mill-059fe1e763504c37527a8ca5206bf9319e88355b.zip |
properly pass through failures from scalaworker maven resolution failures
-rw-r--r-- | docs/pages/1 - Intro to Mill.md | 2 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaWorkerApi.scala | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/pages/1 - Intro to Mill.md b/docs/pages/1 - Intro to Mill.md index 4dd9380e..b879dd05 100644 --- a/docs/pages/1 - Intro to Mill.md +++ b/docs/pages/1 - Intro to Mill.md @@ -17,7 +17,7 @@ To get started, download Mill and install it into your system via the following `curl`/`chmod` command: ```bash -sudo curl -L -o /usr/local/bin/mill https://github.com/lihaoyi/mill/releases/download/0.1.0/0.1.0 && sudo chmod +x /usr/local/bin/mill +sudo curl -L -o /usr/local/bin/mill https://github.com/lihaoyi/mill/releases/download/unstable/0.0.7-51-75a45f && sudo chmod +x /usr/local/bin/mill ``` The simplest Mill build for a Scala project looks as follows: diff --git a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala index 5b7aaa04..4cec0696 100644 --- a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala +++ b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala @@ -14,14 +14,14 @@ import mill.util.JsonFormatters._ object ScalaWorkerApi extends mill.define.ExternalModule { def scalaWorkerClasspath = T{ val scalaWorkerJar = sys.props("MILL_SCALA_WORKER") - if (scalaWorkerJar != null) Loose.Agg.from(scalaWorkerJar.split(',').map(Path(_))) - else { - val mill.eval.Result.Success(v) = resolveDependencies( + if (scalaWorkerJar != null) { + mill.eval.Result.Success(Loose.Agg.from(scalaWorkerJar.split(',').map(Path(_)))) + } else { + resolveDependencies( Seq(Cache.ivy2Local, MavenRepository("https://repo1.maven.org/maven2")), "2.12.4", Seq(ivy"com.lihaoyi::mill-scalaworker:${sys.props("MILL_VERSION")}") - ) - v.map(_.path) + ).map(_.map(_.path)) } } def scalaWorker: Worker[ScalaWorkerApi] = T.worker{ |