gosh: handle same WriteCloser passed to Add{Stdout,Stderr}Writer

Also, a few minor cleanups:
- Update all tests to set sh.Opts.Fatalf to nil as the
  canonical way to disable fatal'ing
- Tweak TestAddWritersUnwrappedStdoutStderr to avoid loops,
  since the loop-free impl is still short and will give more
  useful output on failure
- Expand comment for Cmd.Args to make it clear that it
  doesn't include the path

Note, Cmd.Args not including the path is different from
exec.Cmd, but it seems more sensible given that otherwise
there's an awkward overlap between Cmd.Path and Cmd.Args.
(Also, exec.Cmd special-cases for Cmd.Args==nil, setting it
to []string{Cmd.Path} in that case, which seems a bit
inelegant.)

Change-Id: Icadc8bb892129b67fc060857e4efa0545ea5ce01
3 files changed
tree: 46b0bd040397f5188221061510ddf90c0a1f6e18
  1. cmd/
  2. cmdline/
  3. dbutil/
  4. envvar/
  5. gosh/
  6. host/
  7. ibe/
  8. metadata/
  9. netconfig/
  10. netstate/
  11. set/
  12. textutil/
  13. timing/
  14. toposort/
  15. vlog/
  16. .gitignore
  17. .godepcop
  18. AUTHORS
  19. CONTRIBUTING.md
  20. CONTRIBUTORS
  21. LICENSE
  22. PATENTS
  23. README.md
  24. VERSION
README.md

This repository contains general purpose libraries used by the Vanadium project. TEST