FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

date: strip errno when write to stdout fails by Devel08 · Pull Request #14206 · uutils/coreutils · GitHub

date: strip errno when write to stdout fails - #14206

Open
Devel08 wants to merge 2 commits into
uutils:mainfrom
Devel08:date-stdout-strip-errno
Open

date: strip errno when write to stdout fails#14206
Devel08 wants to merge 2 commits into
uutils:mainfrom
Devel08:date-stdout-strip-errno

Conversation

Devel08 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

github-actions Bot commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/retry (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)

Comment thread src/uu/date/src/date.rs

xtqqczze Aug 28, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please use thiserror crate, something like:

#[derive(Debug, Error)]
enum DateError {
    #[error("{}", translate!("date-error-write", "error" => strip_errno(.0)))]
    Write(io::Error),
}

impl UError for DateError {}

then use:

.map_err(DateError::Write)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

sure, we can even wrap the other errors later too

Devel08 force-pushed the date-stdout-strip-errno branch from d7217d8 to 07c4aa2 Compare August 28, 2026 16:15
date: use thiserror

update thiserror in fuzz
Devel08 force-pushed the date-stdout-strip-errno branch from 602d848 to 733e3f7 Compare August 28, 2026 16:22
Comment thread src/uu/date/Cargo.toml Outdated
]

[dependencies]
thiserror = { workspace = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: alphabetize

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL