Skip to content

Commit 1268ba1

Browse files
committed
lint
1 parent d1cd9ac commit 1268ba1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

paperweight-lib/src/main/kotlin/io/papermc/paperweight/tasks/softspoon/RebuildFilePatches.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ abstract class RebuildFilePatches : BaseTask() {
157157
// todo detect if sed is not present (windows) and switch out sed for something else
158158
@Language("Shell Script")
159159
val sequenceEditor = "sed -i -e 0,/pick/{s/pick/drop/}"
160-
val execs = filesWithNewAts.map { it -> "sed -i -e 's|// Paper-AT:.*||g' $it && ((git add $it && git commit --amend --no-edit) || true)" }.flatMap { listOf("--exec", it) }.toTypedArray()
161-
git.withEnv(mapOf("GIT_SEQUENCE_EDITOR" to sequenceEditor))("rebase", "-i", "file", "--strategy-option=theirs", *execs).executeSilently()
160+
val execs = filesWithNewAts
161+
.map { "sed -i -e 's|// Paper-AT:.*||g' $it && ((git add $it && git commit --amend --no-edit) || true)" }
162+
.flatMap { listOf("--exec", it) }.toTypedArray()
163+
git.withEnv(
164+
mapOf("GIT_SEQUENCE_EDITOR" to sequenceEditor)
165+
)("rebase", "-i", "file", "--strategy-option=theirs", *execs).executeSilently()
162166
} catch (e: Exception) {
163167
// TODO better message to inform the user on what to do
164168
throw RuntimeException("Encountered conflicts while rebuilding file patches.", e)

0 commit comments

Comments
 (0)