'DotNet Nuget pushing same package version without warning

I have a command that runs after release build.

 dotnet nuget push  Test.nupkg -s  \\Path

I am using Dotnet version

6.0.200

and nuget version

6.1.0.103

In the older version of dotnet (2.1) I used to get a error when pushing duplicate version like this

warning MSB3073: The command "dotnet nuget push "***" exited with code 1.

Is there a way to avoid pushing duplicate in 6.0.200 ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source