Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Added support for environments without tty #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/scala/sbt/dependencygraph/SbtAccess.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import Def._
object SbtAccess {
val unmanagedScalaInstanceOnly = Defaults.unmanagedScalaInstanceOnly

def getTerminalWidth: Int = sbt.internal.util.JLine.usingTerminal(_.getWidth)
def getTerminalWidth: Int = sbt.internal.util.JLine.usingTerminal { term ⇒
if (!term.isSupported) Int.MaxValue else term.getWidth
}

def inTask[T](t: Scoped, i: Initialize[T]): Initialize[T] = _root_.sbt.inTask(t, i)
}