mirror of https://github.com/markbates/pkger.git
remove defer clean(), disable go mod tidy in defer
This commit is contained in:
parent
0273362499
commit
498b7fc17a
|
@ -9,6 +9,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
clean := func() {
|
clean := func() {
|
||||||
c := exec.Command("go", "mod", "tidy")
|
c := exec.Command("go", "mod", "tidy")
|
||||||
c.Stdout = os.Stdout
|
c.Stdout = os.Stdout
|
||||||
|
@ -16,7 +17,6 @@ func main() {
|
||||||
c.Stdin = os.Stdin
|
c.Stdin = os.Stdin
|
||||||
c.Run()
|
c.Run()
|
||||||
}
|
}
|
||||||
defer clean()
|
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
|
@ -29,6 +29,7 @@ func main() {
|
||||||
clean()
|
clean()
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func run() error {
|
func run() error {
|
||||||
|
|
Loading…
Reference in New Issue