From 498b7fc17a3196ca641859064be15c722cc2c364 Mon Sep 17 00:00:00 2001 From: WuErPing Date: Tue, 27 Oct 2020 16:44:31 +0800 Subject: [PATCH] remove defer clean(), disable go mod tidy in defer --- cmd/pkger/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/pkger/main.go b/cmd/pkger/main.go index a3aa5ea..bcb0fa2 100644 --- a/cmd/pkger/main.go +++ b/cmd/pkger/main.go @@ -9,6 +9,7 @@ import ( ) func main() { + clean := func() { c := exec.Command("go", "mod", "tidy") c.Stdout = os.Stdout @@ -16,7 +17,6 @@ func main() { c.Stdin = os.Stdin c.Run() } - defer clean() defer func() { if err := recover(); err != nil { @@ -29,6 +29,7 @@ func main() { clean() log.Fatal(err) } + } func run() error {