Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🖨 Override print only in debug builds #355

Merged
merged 2 commits into from
May 4, 2021
Merged

🖨 Override print only in debug builds #355

merged 2 commits into from
May 4, 2021

Conversation

chris-araman
Copy link
Contributor

@chris-araman chris-araman commented May 3, 2021

Unfortunately, the hack for OutputListener broke clearLine and color output. We don't have a way to pass the variadic arguments directly to Swift.print due to a language limitation.

This change fixes progress output from mas upgrade and color output from printInfo, printWarning, and printError. Additionally, we now override print only for debug builds.

I've verified line clearing and color output by inserting the following into OutdatedCommand:

        print("Downloading foo", terminator: "")
        clearLine()
        print("Downloading bar", terminator: "")
        clearLine()
        print("Downloading baz")
        printInfo("Complete")

image

@chris-araman chris-araman requested a review from phatblat May 3, 2021 17:49
@phatblat phatblat merged commit ba4e62f into master May 4, 2021
@phatblat phatblat deleted the print branch May 4, 2021 02:48
@phatblat phatblat added this to the 1.8.2 milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants