Please don't duplicate large blocks of promises like this. These two promises are 95% identical to the ones above. Just define different vars (preferable just one, for the whole command - no need to separate command and args) depending on the OS.