Merge pull request #144 from eed3si9n/wip/will_be_removed_not

Change overwrite warning
This commit is contained in:
Dale Wijnand 2017-07-26 08:57:18 +01:00 committed by GitHub
commit 4ff4e109a0
1 changed files with 4 additions and 3 deletions

View File

@ -400,10 +400,11 @@ private[sbt] object ConvertResolver {
try super.put(source, destination, overwrite)
catch {
case e: java.io.IOException if e.getMessage.contains("destination already exists") =>
val overwriteWarning =
if (destination contains "-SNAPSHOT") s"Attempting to overwrite $destination"
else "Attempting to overwrite $destination (non-SNAPSHOT)\n\tYou need to remove it from the cache manually to take effect."
import org.apache.ivy.util.Message
Message.warn(
s"Attempting to overwrite $destination\n\tThis usage is deprecated and will be removed in sbt 1.0."
)
Message.warn(overwriteWarning)
super.put(source, destination, true)
}
}