Skip to content

tsort: incorrectly errors on odd number of tokens per line #7077

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

Closed
jfinkels opened this issue Jan 5, 2025 · 0 comments · Fixed by #7078
Closed

tsort: incorrectly errors on odd number of tokens per line #7077

jfinkels opened this issue Jan 5, 2025 · 0 comments · Fixed by #7078

Comments

@jfinkels
Copy link
Collaborator

jfinkels commented Jan 5, 2025

Environment: Ubuntu 20.04, uutils main branch (git commit 1e8e16b), GNU coreutils v8.30

Steps to reproduce:

printf "a\nb\n" | tsort

What happens now: uutils tsort terminates with an error message:

tsort: -: input contains an odd number of tokens

What I expected to happen: GNU tsort treats the pair (a, b) as an edge in the graph:

a
b

Notes: I think this is an instance where the GNU documentation could have been clearer. info tsort says, "‘tsort’ reads its input as pairs of strings, separated by blanks, indicating a partial ordering." I think the "separated by blanks" means "any whitespace".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant