Guard against invalid remapJar configs (#256)
Proactively throw an error when input and output paths match instead of letting tiny-remapper fail.
This commit is contained in:
parent
40f78222c0
commit
b3467d9f8d
1 changed files with 7 additions and 0 deletions
|
@ -76,6 +76,13 @@ abstract class RemapJar : JavaLauncherTask() {
|
|||
|
||||
@TaskAction
|
||||
fun run() {
|
||||
if (inputJar.path.absolute().normalize() == outputJar.path.absolute().normalize()) {
|
||||
throw PaperweightException(
|
||||
"Invalid configuration, inputJar and outputJar point to the same path: ${inputJar.path}\n" +
|
||||
"Consider removing customization of output locations, following the default Gradle conventions."
|
||||
)
|
||||
}
|
||||
|
||||
if (toNamespace.get() != fromNamespace.get()) {
|
||||
val logFile = layout.cache.resolve(paperTaskOutput("log"))
|
||||
TinyRemapper.run(
|
||||
|
|
Loading…
Reference in a new issue