Skip to content

Commit

Permalink
fix a deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Sep 7, 2024
1 parent 97d0d35 commit 976f014
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/scala/com/github/sbt/git/ConsoleGitRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ object ConsoleGitRunner extends GitRunner {
private lazy val cmd = if(isWindowsShell) Seq("cmd", "/c", "git") else Seq("git")

// in order to enable colors we trick git into thinking we're a pager, because it already knows we're not a tty
val colorSupport: Seq[(String, String)] =
if(ConsoleLogger.formatEnabled) Seq("GIT_PAGER_IN_USE" -> "1")
val colorSupport: Seq[(String, String)] = {
import sbt.internal.util.Terminal.console
if(console.isAnsiSupported && console.isColorEnabled) Seq("GIT_PAGER_IN_USE" -> "1")
else Seq.empty
}

override def apply(args: String*)(cwd: File, log: Logger = ConsoleLogger()): String = {
val gitLogger = new GitLogger(log)
Expand Down

0 comments on commit 976f014

Please sign in to comment.