actually remove temporary directories after obfuscation
Back in February 2021, we changed the obfuscation logic so that the entire `garble build` process would use one shared temporary directory across all package builds, reducing the amount of files we created in the top-level system temporary directory. However, we made one mistake: we didn't swap os.Remove for os.RemoveAll. Ever since then, we've been leaving temporary files behind. Add regression tests, which failed before the fix, and fix the bug. Note that we need to test `garble reverse` as well, as it calls toolexecCmd separately, so it needs its own cleanup as well. The cleanup happens via the env var, which doesn't feel worse than having toolexecCmd return an extra string or cleanup func. While here, also test that we support TMPDIRs with special characters.pull/560/head
parent
d2622e8223
commit
2d12f41e71
Loading…
Reference in New Issue