File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -581,9 +581,16 @@ main (int argc, char *argv[])
581581 // to get a proper error message, we now fetch the message via the returned exit code
582582 // the call returns false if the call failed, and this is what we expect to have happened
583583 // hence we can assume that there must be an error in GLib if it returned true
584- g_spawn_check_exit_status (exit_status , & error );
584+ if (g_spawn_check_exit_status (exit_status , & error )) {
585+ g_printerr ("Failed to run 'git rev-parse --short HEAD, but GLib says the process didn't exit abnormally" );
586+ }
587+ }
588+
589+ if (error == NULL ) {
590+ g_printerr ("Failed to run 'git rev-parse --short HEAD, but failed to interpret GLib error state: %d\n" , exit_status );
591+ } else {
592+ g_printerr ("Failed to run 'git rev-parse --short HEAD: %s (code %d)\n" , error -> message , error -> code );
585593 }
586- g_printerr ("Failed to run 'git rev-parse --short HEAD: %s (code %d)\n" , error -> message , error -> code );
587594 } else {
588595 version_env = g_strstrip (out );
589596
You can’t perform that action at this time.
0 commit comments