-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
install should overwrite destination files. When the destination exists, it should not print the confusing "install: No such file or directory".
Expected behavior
$ rm -f existing-file-to-be-overwritten.txt
$ echo hello | gnuinstall -m644 /dev/stdin existing-file-to-be-overwritten.txt
$ echo hello | gnuinstall -m644 /dev/stdin existing-file-to-be-overwritten.txt
$ echo bye | gnuinstall -m644 /dev/stdin existing-file-to-be-overwritten.txt
$ # See it worked each time
$ cat existing-file-to-be-overwritten.txt
byeActual behavior
$ git rev-parse HEAD
9397a9c09332dd4a701f344be58d0d59782b2d91
$ rm -f existing-file-to-be-overwritten.txt
$ echo hello | ~/CLionProjects/uutils/target/release/coreutils install -m644 /dev/stdin existing-file-to-be-overwritten.txt
$ # See the first time works
$ echo hello | ~/CLionProjects/uutils/target/release/coreutils install -m644 /dev/stdin existing-file-to-be-overwritten.txt
install: No such file or directory
$ echo hello | ~/CLionProjects/uutils/target/release/coreutils install -m644 /dev/stdin existing-file-to-be-overwritten.txt
install: No such file or directoryDownstream description
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2146464
The simplest reproducer is
echo hello | install -m644 /dev/stdin existing-file-to-be-overwritten.txt
This works in coreutils, but fails with rust-coreutils.I don't think this scripting pattern is uncommon:
{ # lots logic which echoes text } | install <permissions and ownership> /dev/stdin possibly-existing-config-file..which is now broken with rust-coreutils.
Reactions are currently unavailable