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 {
16
16
private lazy val cmd = if (isWindowsShell) Seq (" cmd" , " /c" , " git" ) else Seq (" git" )
17
17
18
18
// 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" )
21
22
else Seq .empty
23
+ }
22
24
23
25
override def apply (args : String * )(cwd : File , log : Logger = ConsoleLogger ()): String = {
24
26
val gitLogger = new GitLogger (log)
You can’t perform that action at this time.
0 commit comments