install-scripts
install-scripts copied to clipboard
Update the usage of cp command depending on coreutils version
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:
- https://github.com/dotnet/vscode-dotnet-runtime/issues/1635
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62572
In order to remove the warning the cp command usage should be updated depending on the version of the cp command installed (coreutils package)
cp -n
isn't used in this repo?
@kasperk81 it is used here: https://github.com/dotnet/install-scripts/blob/33673aca5c9c1c31d408c630f52e3886b2121c05/src/dotnet-install.sh#L964
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).