1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-06-05 10:52:27 +00:00

refactor: prefactor for adding new subcommands

This commit is contained in:
thesayyn 2023-10-20 16:12:08 -07:00
parent 7c8a752a64
commit 83c9fdb78b
No known key found for this signature in database
GPG key ID: D10C0AE203D0E4A8
4 changed files with 555 additions and 507 deletions

View file

@ -18,6 +18,7 @@ func main() {
for _, arg := range flag.Args() {
cmd := exec.Command("bash", arg)
if os.Getenv("TMPDIR") != "" {
cmd.Env = append(cmd.Env, os.Environ()...)
cmd.Env = append(cmd.Env, "TMPDIR="+os.Getenv("TMPDIR"))
}
cmd.Stderr = os.Stderr