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

If piped output is empty can as-tree not print new line? #19

Open
avatar-lavventura opened this issue Mar 30, 2021 · 0 comments · May be fixed by #21
Open

If piped output is empty can as-tree not print new line? #19

avatar-lavventura opened this issue Mar 30, 2021 · 0 comments · May be fixed by #21

Comments

@avatar-lavventura
Copy link

avatar-lavventura commented Mar 30, 2021

If fdfind folder_name returns a empty output | as-tree prints a new-line. Is it possible to not make it print new-line?

Actual behavior:

$ fdfind folder_name  # returns no solution
$ fdfind folder_name | as-tree                                       

$

Wanted behavior:

$ fdfind folder_name  # returns no solution
$ fdfind folder_name | as-tree                                       
$
sharkdp added a commit to sharkdp/as-tree that referenced this issue Jul 5, 2021
Fixes a panic when writing to a closed pipe by explicitly ignoring this
error type.

This commit also changes the behavior of `as-tree` on empty inputs which
would previously result in a (superfluous) newline.

closes jez#15
closes jez#19
@sharkdp sharkdp linked a pull request Jul 5, 2021 that will close this issue
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 a pull request may close this issue.

1 participant