coreutils
coreutils copied to clipboard
Possible improvement of mktemp error message
mktemp requires three 'X' in the pattern argument. In the case where the XXX is missing and the tmpdir option is provided, the uutils-coreutils mktemp error message is a bit cryptic. This error message is better in the GNU version and could be improved in my opinion:
coreutils$ ./target/release/coreutils mktemp --tmpdir foobar
mktemp: failed to create file via template 'foobar/tmp.XXXXXXXXXX': No such file or directory
GNU version:
$ mktemp --tmpdir foobar
mktemp: too few X's in template ‘foobar’
Note that for the version without tmpdir, the error messages are the same in both versions:
GNU version:
coreutils$ mktemp foobar
mktemp: too few X's in template ‘foobar’
$ ./target/release/coreutils mktemp foobar
mktemp: too few X's in template 'foobar'
That sounds like a good improvement indeed. Would you like to try to fix it?
That sounds like a good improvement indeed. Would you like to try to fix it?
I don't think I'll have time in the coming weeks (maybe later), so if someone wants to work on that feel free to.
Im working on this. Dont have too much time available, but should be coming soon :)
Fixed in https://github.com/uutils/coreutils/pull/4342