install-scripts icon indicating copy to clipboard operation
install-scripts copied to clipboard

Update the usage of cp command depending on coreutils version

Open f-alizada opened this issue 1 year ago • 3 comments

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)

f-alizada avatar Feb 06 '24 11:02 f-alizada

cp -n isn't used in this repo?

kasperk81 avatar Mar 10 '24 17:03 kasperk81

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

f-alizada avatar Mar 11 '24 08:03 f-alizada

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).

jessuppi avatar May 20 '24 06:05 jessuppi