1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-06-29 04:58:28 +00:00

cli.test: passthrough and use TMPDIR

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-01-20 11:29:59 -05:00
parent d1073b349b
commit 235566d9e0
Signed by: vbatts
GPG key ID: 10937E57733F1362
8 changed files with 11 additions and 8 deletions

View file

@ -13,6 +13,9 @@ func main() {
failed := 0
for _, arg := range flag.Args() {
cmd := exec.Command("bash", arg)
if os.Getenv("TMPDIR") != "" {
cmd.Env = append(cmd.Env, "TMPDIR="+os.Getenv("TMPDIR"))
}
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
if err := cmd.Run(); err != nil {