dotnet / install-scripts

MIT License
128 stars 68 forks source link

Update the usage of cp command depending on coreutils version #436

Open f-alizada opened 5 months ago

f-alizada commented 5 months ago

Recently there were changes in coreutils package which contains the cp command. starting from 9.4-3 when using cp -n it results warning output: 'behavior of -n is non-portable and may change in future; use --update=none instead'

For more details:

In order to remove the warning the cp command usage should be updated depending on the version of the cp command installed (coreutils package)

kasperk81 commented 4 months ago

cp -n isn't used in this repo?

f-alizada commented 4 months ago

@kasperk81 it is used here: https://github.com/dotnet/install-scripts/blob/33673aca5c9c1c31d408c630f52e3886b2121c05/src/dotnet-install.sh#L964

jessuppi commented 1 month ago

Just fyi we had a discussion on our forum about this:

https://slickstack.io/forum/topic/cp-warning-behavior-of-n-is-non-portable-and-may-change-in-future

--update=none is also having issues, and it might not be a good idea to use it (yet).