mirror of https://github.com/sbt/sbt.git
Merge pull request #3612 from dwijnand/scope-toString
Handle Global in Scope#toString
This commit is contained in:
commit
1251817cf2
|
|
@ -29,9 +29,10 @@ final case class Scope(project: ScopeAxis[Reference],
|
|||
def in(config: ConfigKey): Scope = copy(config = Select(config))
|
||||
def in(task: AttributeKey[_]): Scope = copy(task = Select(task))
|
||||
|
||||
override def toString: String = {
|
||||
if (extra == This) s"$project / $config / $task"
|
||||
else s"Scope($project, $config, $task, $extra)"
|
||||
override def toString: String = this match {
|
||||
case Scope(Zero, Zero, Zero, Zero) => "Global"
|
||||
case Scope(_, _, _, This) => s"$project / $config / $task"
|
||||
case _ => s"Scope($project, $config, $task, $extra)"
|
||||
}
|
||||
}
|
||||
object Scope {
|
||||
|
|
|
|||
Loading…
Reference in New Issue