GNU unexpand shows an error if the user specifies a directory and returns 1 as exit code:
$ echo "content" > file
$ unexpand dir file
unexpand: dir: Is a directory
content
$ echo $?
1
uutils unexpand, on the other hand, doesn't output anything and returns 0 as exit code:
$ echo "content" > file
$ cargo run unexpand dir file
$ echo $?
0