Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions dep/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"
"os/exec"
"regexp"
"sync"
"time"

"github.com/go-tstr/tstr/strerr"
Expand Down Expand Up @@ -234,7 +233,7 @@ func WithPreCmd(cmd *exec.Cmd) Opt {
func WithGoCode(modulePath, mainPkg string) Opt {
var target string
eg := &errgroup.Group{}
eg.Go(sync.OnceValue(func() error {
eg.Go(func() error {
dir, err := os.MkdirTemp("", "go-tstr")
if err != nil {
return fmt.Errorf("failed to create tmp dir for go binary: %w", err)
Expand All @@ -251,7 +250,7 @@ func WithGoCode(modulePath, mainPkg string) Opt {
return fmt.Errorf("%w: %w", ErrBuildFailed, err)
}
return nil
}))
})

return func(c *Cmd) error {
if err := eg.Wait(); err != nil {
Expand Down