Thanks. Personally, I would prefer the following:
```erlang
    case rebar_utils:sh(Cmd ++ Output, [{env,[{"TESTDIR", TestDir}]},
                                        return_on_error]) of
```