Support ANSI commands when using xcodebuild#214
Open
jflan-dd wants to merge 1 commit intovapor:mainfrom
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
==========================================
+ Coverage 45.75% 46.56% +0.81%
==========================================
Files 46 46
Lines 1906 1864 -42
==========================================
- Hits 872 868 -4
+ Misses 1034 996 -38
🚀 New features to boost your workflow:
|
Contributor
Author
|
I was looking at the Bazel command documentation for an unrelated reason and saw that their "auto" color mode uses similar logic to this, but with a couple more cases.
I'd be happy to update this PR to match that behavior if preferred. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My project is running into an issue where SPM isn't able to create a multi-arch binary similar to this one:
swiftlang/swift-package-manager#8013
While not quite the same issue, this forum post suggests using
xcodebuildto resolve issues when building for multiple archs:https://forums.swift.org/t/swiftpm-compile-multiple-arch-system-library/75724/3
Using
xcodebuildresolved my issue, but it causes the#if Xcodecheck withinsupportsANSICommandsto fail which breaks lots of things.This PR checks the
TERMenvironment variable instead, which Xcode sets to"dumb"to indicate that it doesn't support ANSI commands. Cursory searching online leads me to believe this is a common pattern to communicate inability to support ANSI commands.Testing:
xcodebuild build -scheme ConsoleKitExample -derivedDataPath DerivedData -destination "generic/platform=macOS"then
./DerivedData/Build/Products/Debug/ConsoleKitExample