PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks
240 stars 48 forks source link

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

Closed nitkanikita21 closed 2 years ago

nitkanikita21 commented 2 years ago

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:

NoahvdAa commented 2 years ago

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.

nitkanikita21 commented 2 years ago

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'.
NoahvdAa commented 2 years ago

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

nitkanikita21 commented 2 years ago

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

NoahvdAa commented 2 years ago
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)

electronicboy commented 2 years ago

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.