From 14dac703c8aab37e19eb0cfbeccd2f6b1ba9f063 Mon Sep 17 00:00:00 2001 From: Thomas Miceli Date: Thu, 20 Apr 2023 21:48:25 +0200 Subject: [PATCH] Fix git zombie process --- internal/git/commands.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/git/commands.go b/internal/git/commands.go index 7797e8c..e26d753 100644 --- a/internal/git/commands.go +++ b/internal/git/commands.go @@ -99,6 +99,7 @@ func GetFileContent(user string, gist string, revision string, filename string, if err != nil { return "", false, err } + defer cmd.Wait() return truncateCommandOutput(stdout, maxBytes) } @@ -126,6 +127,7 @@ func GetLog(user string, gist string, skip int) ([]*Commit, error) { if err != nil { return nil, err } + defer cmd.Wait() return parseLog(stdout, 2<<18), nil }