-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
The GNU version of truncate
returns exit status 1 when the arguments are invalid, but the uutils version of truncate
returns exit status 2.
GNU truncate
$ truncate file
truncate: you must specify either ‘--size’ or ‘--reference’
Try 'truncate --help' for more information.
$ echo $?
1
uutils truncate
$ ./target/debug/truncate file
error: The following required arguments were not provided:
--reference <RFILE>
--size <SIZE>
USAGE:
./target/debug/truncate [OPTION]... [FILE]...
For more information try --help
$ echo $?
2
In order to get the first two test cases in the GNU test file tests/misc/truncate-parameters.sh
to pass, the uutils version needs to return exit status 1 in this situation.