Use State to pick the port file

This commit is contained in:
Eugene Yokota 2018-01-30 00:42:02 -05:00
parent 50f3dd2e20
commit 4b1de14f87
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ private[sbt] final class CommandExchange {
subscribe(channel)
}
if (server.isEmpty && firstInstance.get) {
val portfile = (new File(".")).getAbsoluteFile / "project" / "target" / "active.json"
val portfile = s.baseDir / "project" / "target" / "active.json"
val h = Hash.halfHashString(IO.toURI(portfile).toString)
val tokenfile = BuildPaths.getGlobalBase(s) / "server" / h / "token.json"
val socketfile = BuildPaths.getGlobalBase(s) / "server" / h / "sock"