I've blatantly ripped off restoreContent's use of wait groups around stdout and stderr copying. This commit prevents the copy from hanging when a command is called with psdebug set in windows. See https://github.com/hashicorp/packer/issues/4891 for a repro case that fails before and passes after this commit.
I've blatantly ripped off restoreContent's use of wait groups around stdout and stderr copying. This commit prevents the copy from hanging when a command is called with psdebug set in windows. See https://github.com/hashicorp/packer/issues/4891 for a repro case that fails before and passes after this commit.