File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/scala/com/github/sbt/git Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ object ConsoleGitRunner extends GitRunner {
1616 private lazy val cmd = if (isWindowsShell) Seq (" cmd" , " /c" , " git" ) else Seq (" git" )
1717
1818 // in order to enable colors we trick git into thinking we're a pager, because it already knows we're not a tty
19- val colorSupport : Seq [(String , String )] =
20- if (ConsoleLogger .formatEnabled) Seq (" GIT_PAGER_IN_USE" -> " 1" )
19+ val colorSupport : Seq [(String , String )] = {
20+ import sbt .internal .util .Terminal .console
21+ if (console.isAnsiSupported && console.isColorEnabled) Seq (" GIT_PAGER_IN_USE" -> " 1" )
2122 else Seq .empty
23+ }
2224
2325 override def apply (args : String * )(cwd : File , log : Logger = ConsoleLogger ()): String = {
2426 val gitLogger = new GitLogger (log)
You can’t perform that action at this time.
0 commit comments