mirror of https://github.com/sbt/sbt.git
allow running last from load failure prompt
This commit is contained in:
parent
2d4d27e529
commit
f654b03618
|
|
@ -367,7 +367,7 @@ object BuiltinCommands
|
|||
def loadFailed = Command.command(LoadFailed)(handleLoadFailed)
|
||||
@tailrec def handleLoadFailed(s: State): State =
|
||||
{
|
||||
val result = (SimpleReader.readLine("Project loading failed: (r)etry, (q)uit, or (i)gnore? ") getOrElse Quit).toLowerCase
|
||||
val result = (SimpleReader.readLine("Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ") getOrElse Quit).toLowerCase
|
||||
def matches(s: String) = !result.isEmpty && (s startsWith result)
|
||||
|
||||
if(result.isEmpty || matches("retry"))
|
||||
|
|
@ -380,6 +380,8 @@ object BuiltinCommands
|
|||
logger(s).warn("Ignoring load failure: " + (if(hadPrevious) "using previously loaded project." else "no project loaded."))
|
||||
s
|
||||
}
|
||||
else if(matches("last"))
|
||||
LastCommand :: LoadFailed :: s
|
||||
else
|
||||
{
|
||||
println("Invalid response.")
|
||||
|
|
|
|||
Loading…
Reference in New Issue