Commit 926f2787 authored by Mohit Agarwal's avatar Mohit Agarwal Committed by Ian Lance Taylor

cmd/fix: cleanup directories created during typecheck

Executing

$ go tool dist test -run=^go_test:cmd/fix$

leaves a number of directories (fix_cgo_typecheck*) in TMPDIR.

Change-Id: Ia5bdc2f7d884333771d50365063faf514ebf6eae
Reviewed-on: https://go-review.googlesource.com/90795
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 32a08d09
......@@ -166,7 +166,7 @@ func typecheck(cfg *TypeConfig, f *ast.File) (typeof map[interface{}]string, ass
if err != nil {
return err
}
defer os.Remove(dir)
defer os.RemoveAll(dir)
err = ioutil.WriteFile(filepath.Join(dir, "in.go"), txt, 0600)
if err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment