Skip to content

Commit b5b6db7

Browse files
committed
Some logging and todo changes
This might be completely wrong. Awaiting jmp.
1 parent 98a37bd commit b5b6db7

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

paperweight-core/src/main/kotlin/io/papermc/paperweight/core/PaperweightCore.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ abstract class PaperweightCore : Plugin<Project> {
201201
"$OLD_PAPER_PATH/${coreExt.updatingMinecraft.oldPaperCommit.get()}/paper-server/src/minecraft/java"
202202
).absolutePathString()
203203
}
204+
205+
PatchRouletteTasks(
206+
target,
207+
"paper",
208+
coreExt.minecraftVersion,
209+
coreExt.paper.rejectsDir,
210+
layout.projectDirectory.dir("src/minecraft/java"),
211+
)
204212
}
205-
// TODO move into above 'if'
206-
PatchRouletteTasks(
207-
target,
208-
"paper",
209-
coreExt.minecraftVersion,
210-
coreExt.paper.sourcePatchDir, // TODO use reject dir
211-
layout.projectDirectory.dir("src/minecraft/java"),
212-
)
213213
}
214214
}
215215
}

paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patchroulette/PatchRouletteApply.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,17 @@ abstract class PatchRouletteApply : AbstractPatchRouletteTask() {
9898

9999
private fun applyPatch(patch: String) {
100100
val git = Git(targetDir.path)
101-
git(
101+
val responseCode = git(
102102
"-c",
103103
"rerere.enabled=false",
104104
"apply",
105105
"--3way",
106106
patchDir.path.resolve(patch).relativeTo(targetDir.path).invariantSeparatorsPathString
107107
).runOut()
108+
if (responseCode > 0) {
109+
logger.error("Check above ^^^, Something when wrong while applying $patch")
110+
logger.error("You might need to apply manually or check the target repo state.")
111+
}
108112
logger.lifecycle("Finish the patch apply and rebuild, then run the finish task (or cancel with the cancel task)")
109113
}
110114

0 commit comments

Comments
 (0)