PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in `:applyPatches` task / PaperweightException: Command finished with 128 exit code

nitkanikita21 opened this issue · comments

I ran into a problem while trying to deploy a fork of Paper.
I'm trying to run the :applyPatches task and I get the following error.

> Task :paper:applyApiPatches FAILED
> Task :getPaperUpstreamData FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper:applyApiPatches'.
> io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upstream/upstream

This issue occurs in both Paper and paperweight-examples

System: Windows 10
I've tried:

  • Run task on clean projects without changes
  • Disable path length limitation (both in git and in the system)
  • Restart computer
  • Run task inside WSL2 (Ubuntu)

Did you clone the repo using git clone (instead of downloading as zip from GH)? If you run the task with -Dpaperweight.debug=true it should give you more information.

I tried both clone the project and just zip.
Gradle complains about -Dpaperweight.debug=true:

* What went wrong:
Task '.debug=true' not found in root project 'forktest'.

If you're on windows, you might have to wrap the argument in quotes, "-Dpaperweight.debug=true"

Yes, wrapping it in quotes, it worked. Here is the complete output of the command
https://pastebin.com/btTdY0YL

fatal: Unable to create 'D:/CODING/Clock-PaperFork/.gradle/caches/paperweight/upstreams/paper/Paper-API/.git/index.lock': File exists.
 
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Try removing the Paper-API/.git/index.lock file and run the command again (or alternatively just nuke the entire Paper-API dir, it'll regenerate)

Line 78, work out why the lock file exists/delete it; Stuff like this is often down to random issues with antivirus software, etc, screwing with git; make sure that git is updated too.