coreutils
coreutils copied to clipboard
chmod: Extra verbosity for symlink creation is wrong
MRE
>touch a
>ln -s a b
rm a
Produces different output
uu_chmod u+x b
failed to change mode of 'b' from 0000 (---------) to 0000 (---------)
./target/debug/chmod: cannot operate on dangling symlink 'b'
GNU
chmod u+x b
chmod: cannot operate on dangling symlink 'b'
However, if the --verbose flag is used, then the messages match , but still the uu_chmod is wrong, as :
uu_chmod u+x --verbose b
failed to change mode of 'b' from 0000 (---------) to 0000 (---------)
./target/debug/chmod: cannot operate on dangling symlink 'b'
GNU
chmod u+x --verbose b
chmod: cannot operate on dangling symlink 'b'
failed to change mode of 'b' from 0000 (---------) to 1500 (r-x-----T)
Notice the r-x-----T and the 1500, whereas uu_chmod has a hardcoded failure message(for mode)
Introduced in #1967