Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4.19k stars 113 forks source link

dua (non interactive) lost its ability to process files #194

Closed TimB87 closed 11 months ago

TimB87 commented 11 months ago

Hi @Byron :wave:

It seems that starting with version 2.21.0 dua lost its ability to process single files in non interactive mode.

With 2.20.3:

~
tim@fs ❯ dua -V
dua 2.20.3                                                                                                                                                                                                    3ms
~
tim@fs ❯ dua emoji-test.txt
 628.00 KiB emoji-test.txt                                                                                                                                                                                    3ms
~
tim@fs ❯

With 2.21.0:

~
tim@fs ❯ dua -V
dua 2.21.0                                                                                                                                                                                                    3ms
~
tim@fs ❯ dua emoji-test.txt
Error: Not a directory (os error 20)                                                                                                                                                                          3ms
~
tim@fs ❯

The same applies to 2.22.0:

~
tim@fs ❯ dua -V
dua 2.22.0                                                                                                                                                                                                    3ms
~
tim@fs ❯ dua emoji-test.txt
Error: Not a directory (os error 20)                                                                                                                                                                          3ms
~
tim@fs ❯

It works with wildcards on every version though:

~
tim@fs ❯ dua emoji-*
 188.00 KiB emoji-sequences.txt
 628.00 KiB emoji-test.txt
 816.00 KiB total
Byron commented 11 months ago

Thanks for letting me know! I will release a fix for it soon.

TimB87 commented 11 months ago

195 fixes the issue :+1: Thanks a lot!

Byron commented 11 months ago

Great!

And here is the new release.