Edrusb / DAR

DAR - Disk ARchive
http://dar.linux.free.fr/
GNU General Public License v2.0
133 stars 19 forks source link

cp: illegal option -- d #54

Closed ryandesign closed 1 year ago

ryandesign commented 1 year ago

I noticed this output when installing dar 2.7.11 on macOS 12:

make[4]: Entering directory `/opt/local/var/macports/build/_Volumes_Shared_macports-ports_archivers_dar/dar/work/dar-2.7.11/doc'
'./portable_cp' html /opt/local/var/macports/build/_Volumes_Shared_macports-ports_archivers_dar/dar/work/destroot/opt/local/share/dar
cp: illegal option -- d
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file ... target_directory

The installation still proceeded and exited with a successful status code.

Edrusb commented 1 year ago

Yes, if you read the doc/portable_cp script (found in source code), you'll see that it tries different options to the cp command and depending on the result (its exit status) tries another combination

if this script failed, it would first exit with non zero status code and would also display something like

"Impossible to create .... or .... in order to determine capabilities of the 'cp' command"

So there is no issue here, though I will redirect the two cp tentative outputs to /dev/null for this message to not show.

Thanks for feedback

Edrusb commented 1 year ago

closing report with release 2.7.12 that integrates this fix