pcal43 / fastback

Fast, incremental Minecraft world backups. Powered by Git.
https://pcal43.github.io/fastback/
GNU General Public License v2.0
125 stars 19 forks source link

fix git-lfs not being detected on windows #321

Closed Merith-TK closed 4 months ago

Merith-TK commented 4 months ago

On windows git-lfs is not a command, however (exclusively) on windows, git comes with lfs bundled into it by default, so git lfs, with a space, is needed

this does indeed work on linux as well, image left is a linux machine right is my local windows machine,

Merith-TK commented 4 months ago

before I applied the patch

[09:31:01] [main/INFO] (fastback) git is installed: git version 2.42.0.windows.2
[09:31:01] [main/WARN] (fastback) git-lfs is not installed.

after

[09:32:19] [main/INFO] (fastback) git is installed: git version 2.42.0.windows.2
[09:32:19] [main/INFO] (fastback) git-lfs is installed: git-lfs/3.4.0 (GitHub; windows amd64; go 1.20.6; git d06d6e9e)
Merith-TK commented 4 months ago

Going to make a few more tweaks based off some things I have found in further testing, as it appears git does internally call git-lfs,(seeing an error where it is throwing git-lfs not found by the mod, but when I run the command directly it has no problem???) which I know we had an... argument about in the past so im waving the flag on that one and saying you right lol

there is a command called git --exec-path where git returns one of its internal directories, going to see if I can patch that to be injected into the PATH of the runtime