Created by: BYK
This is a follow up to #3806. Instead of recreating the file and leaving it there, we trick CMD to stop reading the file after the first line by modifying the CMD script.
*This is a "better" solution because:
- It doesn't leave obsolete files around
- This fix can be incorporated into npm and yarn via https://github.com/npm/cmd-shim/