Skip to content

Commit 20d0e59

Browse files
committed
lock os thread
1 parent 367a860 commit 20d0e59

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/gitter.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"path"
1111
"path/filepath"
1212
"regexp"
13+
"runtime"
1314
"strconv"
1415
"strings"
1516
)
@@ -57,6 +58,8 @@ func MaybeSync(w io.Writer) {
5758
}
5859

5960
func (dg DefaultGitter) Exec(args ...string) (output []byte, err error) {
61+
runtime.LockOSThread()
62+
defer runtime.UnlockOSThread()
6063
var sout, serr bytes.Buffer
6164
cmd := exec.Command(dg.Git, args...) /* #nosec G204 */
6265
cmd.Stdout = &sout

0 commit comments

Comments
 (0)