mirror of https://github.com/sbt/sbt.git
Change overwrite warning
Previously the warning read:
Attempting to overwrite $destination
This usage is deprecated and will be removed in sbt 1.0.
This is an empty threat since we did not remove the feature.
I'm replacing it with:
Attempting to overwrite $destination (non-SNAPSHOT)
You need to remove it from the cache manually to take effect.
Fixes sbt/sbt#3271
This commit is contained in:
parent
bf733e782b
commit
22f47be292
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue