Fixes #8836 - Add env param/documentation to cmd.wait