Skip to content

Conversation

@willshuttleworth
Copy link
Contributor

@willshuttleworth willshuttleworth commented May 27, 2025

Fix related to this issue. I have removed the Device enum that had a variant for a file and for stdout. Instead, just using a file passed with --file flag or /dev/tty by default. Output redirection (redirecting to file or pipe) now works.

In terms of testing, the same issues exist with other stty testing as cargo test doesn't run in a tty. I have added tests in a related PR, but these tests are limited to inputs that should fail.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@willshuttleworth
Copy link
Contributor Author

Instead of defaulting to /dev/tty with no fallback, now I'm trying /dev/tty first then falling back to stdout

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@cakebaker cakebaker linked an issue Jun 2, 2025 that may be closed by this pull request
@cakebaker cakebaker merged commit dfc4072 into uutils:main Jun 2, 2025
74 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR!

@willshuttleworth willshuttleworth deleted the stty-redirect-output branch June 16, 2025 14:23
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.

stty panics when output is redirected

2 participants