Commit f676566a authored by w8385's avatar w8385
Browse files

Fix fedify nodeinfo ColorSupport detects Windows Terminal

parent 26480ace
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -299,6 +299,14 @@ function checkTerminalColorSupport(): "truecolor" | "256color" | "none" {
    return "256color";
  }

  // Check for Windows Terminal support
  // FIXME: WT_SESSION is not a reliable way to check for Windows Terminal support
  const isWindows = Deno.build.os === "windows";
  const isWT = Deno.env.get("WT_SESSION");
  if (isWindows && isWT != null && isWT !== "") {
    return "truecolor";
  }

  return "none";
}