Skip to content

Commit

Permalink
Add three slashes (u3) for file URI
Browse files Browse the repository at this point in the history
sbt#3088 attemped to fix the sbt#3086, but by putting no slashes in `sbt.boot.properties` the launcher created by 0.13.15-* becomes incompatible for all previous sbt versions.

The uglier but backward compatible fix for sbt#3086 is to use u3 format with three slashes. This on Windows will resolve to `file:///C:/Users/foo/.sbt/preloaded`, and on Mac and Linux `file:////root/.sbt/preloaded/`. Mac and Linux are both tolerant of extra slashes on the front:

```
> eval new File(new URL("file:////Users/foo/.sbt/preloaded/").toURI)
[info] ans: java.io.File = /Users/foo/.sbt/preloaded
```
  • Loading branch information
eed3si9n committed Apr 9, 2017
1 parent c31dfda commit f42ddc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launch/src/main/input_resources/sbt/sbt.boot.properties
Expand Up @@ -12,8 +12,8 @@

[repositories]
local
local-preloaded-ivy: file:${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
local-preloaded: file:${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
maven-central
typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
Expand Down

0 comments on commit f42ddc8

Please sign in to comment.