Skip to content

Commit

Permalink
xcode doesn't support colors
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiu committed Aug 10, 2020
1 parent bc6452e commit 9896f3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/luoxiu/Rainbow",
"state": {
"branch": null,
"revision": "9bc8fa136c8cec2f4a5c8ad1e8d37753e05db9d5",
"version": "0.1.0"
"revision": "9d8fcb4c64e816a135c31162a0c319e9f1f09c35",
"version": "0.1.1"
}
}
]
Expand Down
4 changes: 4 additions & 0 deletions Sources/Chalk/TerminalSupportedColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public enum TerminalSupportedColor {

let env = ProcessInfo.processInfo.environment

if let name = env["XPC_SERVICE_NAME"], name.starts(with: "com.apple.dt.Xcode") {
return .none
}

if env["CI"] != nil {
for ci in ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"] {
if env[ci] != nil { return .ansi16 }
Expand Down

0 comments on commit 9896f3c

Please sign in to comment.