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

Cannot set environment variable NO_COLOR #283

Open
ikelax opened this issue Jun 17, 2024 · 0 comments
Open

Cannot set environment variable NO_COLOR #283

ikelax opened this issue Jun 17, 2024 · 0 comments

Comments

@ikelax
Copy link
Contributor

ikelax commented Jun 17, 2024

If I set the environment variable NO_COLOR, e.g. to true, and run swift test | ./xcbeautify, I get this error message

ArgumentParser/ParsableArguments.swift:283: Fatal error: Validation failed for `Xcbeautify`:

- One or more Boolean flags is declared with an initial value of `true`.
This results in the flag always being `true`, no matter whether the user
specifies the flag or not.

To resolve this error, change the default to `false`, provide a value
for the `inversion:` parameter, or remove the `@Flag` property wrapper
altogether.

Affected flag(s):
--disable-colored-output


Building for debugging...
[2/2] Write swift-version--58304C5D6DBC2206.txt
Build complete! (2.80s)
fish: Process 40787, './xcbeautify' from job 1, 'swift test | ./xcbeautify' terminated by signal SIGTRAP (Trace or breakpoint trap)

Running the command in zsh, yields a similar output

ArgumentParser/ParsableArguments.swift:283: Fatal error: Validation failed for `Xcbeautify`:

- One or more Boolean flags is declared with an initial value of `true`.
This results in the flag always being `true`, no matter whether the user
specifies the flag or not.

To resolve this error, change the default to `false`, provide a value
for the `inversion:` parameter, or remove the `@Flag` property wrapper
altogether.

Affected flag(s):
--disable-colored-output


Building for debugging...
[2/2] Write swift-version--58304C5D6DBC2206.txt
Build complete! (2.08s)
zsh: broken pipe  swift test | 
zsh: trace trap   ./xcbeautify
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

No branches or pull requests

1 participant