mirror of
https://github.com/sbt/sbt.git
synced 2026-09-02 02:57:21 +02:00
Merge pull request #3991 from dwijnand/ExecStatusEvent-exitCode
Add an optional exitCode to ExecStatusEvent so clients can use it
This commit is contained in:
@@ -19,7 +19,7 @@ final class CommandSource private (
|
||||
override def toString: String = {
|
||||
"CommandSource(" + channelName + ")"
|
||||
}
|
||||
protected[this] def copy(channelName: String = channelName): CommandSource = {
|
||||
private[this] def copy(channelName: String = channelName): CommandSource = {
|
||||
new CommandSource(channelName)
|
||||
}
|
||||
def withChannelName(channelName: String): CommandSource = {
|
||||
|
||||
@@ -21,7 +21,7 @@ final class Exec private (
|
||||
override def toString: String = {
|
||||
"Exec(" + commandLine + ", " + execId + ", " + source + ")"
|
||||
}
|
||||
protected[this] def copy(commandLine: String = commandLine, execId: Option[String] = execId, source: Option[sbt.CommandSource] = source): Exec = {
|
||||
private[this] def copy(commandLine: String = commandLine, execId: Option[String] = execId, source: Option[sbt.CommandSource] = source): Exec = {
|
||||
new Exec(commandLine, execId, source)
|
||||
}
|
||||
def withCommandLine(commandLine: String): Exec = {
|
||||
@@ -42,8 +42,8 @@ final class Exec private (
|
||||
}
|
||||
object Exec {
|
||||
def newExecId: String = java.util.UUID.randomUUID.toString
|
||||
def apply(commandLine: String, source: Option[sbt.CommandSource]): Exec = new Exec(commandLine, None, source)
|
||||
def apply(commandLine: String, source: sbt.CommandSource): Exec = new Exec(commandLine, None, Option(source))
|
||||
def apply(commandLine: String, source: Option[sbt.CommandSource]): Exec = new Exec(commandLine, source)
|
||||
def apply(commandLine: String, source: sbt.CommandSource): Exec = new Exec(commandLine, Option(source))
|
||||
def apply(commandLine: String, execId: Option[String], source: Option[sbt.CommandSource]): Exec = new Exec(commandLine, execId, source)
|
||||
def apply(commandLine: String, execId: String, source: sbt.CommandSource): Exec = new Exec(commandLine, Option(execId), Option(source))
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ private[sbt] object Server {
|
||||
val maxSocketLength = new UnixDomainSocketLibrary.SockaddrUn().sunPath.length - 1
|
||||
val path = socketfile.getAbsolutePath
|
||||
if (path.length > maxSocketLength)
|
||||
sys.error("socket file absolute path too long; " +
|
||||
sys.error(
|
||||
"socket file absolute path too long; " +
|
||||
"either switch to another connection type " +
|
||||
"or define a short \"SBT_GLOBAL_SERVER_DIR\" value. " +
|
||||
s"Current path: ${path}")
|
||||
|
||||
Reference in New Issue
Block a user