Code Monkey home page Code Monkey logo

Comments (3)

kusma avatar kusma commented on June 16, 2024

Yeah, looks like we need to do something along these lines:

diff --git a/src/git-wrapper/git-wrapper.c b/src/git-wrapper/git-wrapper.c
index 0618442..269145a 100644
--- a/src/git-wrapper/git-wrapper.c
+++ b/src/git-wrapper/git-wrapper.c
@@ -18,7 +18,8 @@ int __stdcall wmain(void)
 int main(void)
 #endif
 {
-    int r = 1, wait = 1;
+    DWORD exit_code = 0;
+    int wait = 1;
     WCHAR exepath[MAX_PATH], exe[MAX_PATH];
     LPWSTR cmd = NULL, path2 = NULL, exep = exe;
     UINT codepage = 0;
@@ -148,13 +149,15 @@ int main(void)
                       NULL, /* environment: use parent */
                       NULL, /* starting directory: use parent */
                       &si, &pi);
-        if (wait)
-            WaitForSingleObject(pi.hProcess, INFINITE);
+        if (wait) {
+       WaitForSingleObject(pi.hProcess, INFINITE);
+       GetExitCodeProcess(pi.hProcess, &exit_code);
+   }
     }

     free(cmd);

     /* reset the console codepage */
     SetConsoleCP(codepage);
-    ExitProcess(r);
+    ExitProcess(exit_code);
 }

from git.

patthoyts avatar patthoyts commented on June 16, 2024

Agreed - I've a patch basically doing just that.

Duplicate of msysgit/msysgit#43

from git.

patthoyts avatar patthoyts commented on June 16, 2024

I doubt the scripts started 'crashing' - failing perhaps. An updated git.exe wrapper and the updated source have been pushed to the devel branch of msysgit/msysgit so please try them out so we can do an updated installer as soon as possible.

from git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.