mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-28 02:23:48 -05:00
run-command: be helpful with Git LFS fails on Windows 7
Git LFS is now built with Go 1.21 which no longer supports Windows 7. However, Git for Windows still wants to support Windows 7. Ideally, Git LFS would re-introduce Windows 7 support until Git for Windows drops support for Windows 7, but that's not going to happen: https://github.com/git-for-windows/git/issues/4996#issuecomment-2176152565 The next best thing we can do is to let the users know what is happening, and how to get out of their fix, at least. This is not quite as easy as it would first seem because programs compiled with Go 1.21 or newer will simply throw an exception and fail with an Access Violation on Windows 7. The only way I found to address this is to replicate the logic from Go's very own `version` command (which can determine the Go version with which a given executable was built) to detect the situation, and in that case offer a helpful error message. This addresses https://github.com/git-for-windows/git/issues/4996. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Git for Windows Build Agent
parent
a61bd2e63d
commit
7cd044cd9e
@@ -581,6 +581,7 @@ static int wait_or_whine(pid_t pid, const char *argv0, int in_signal)
|
||||
*/
|
||||
code += 128;
|
||||
} else if (WIFEXITED(status)) {
|
||||
warn_about_git_lfs_on_windows7(status, argv0);
|
||||
code = WEXITSTATUS(status);
|
||||
} else {
|
||||
if (!in_signal)
|
||||
|
||||
Reference in New Issue
Block a user