This line would probably detect a Mac as a Windows machine, because there is a "win" in "darwin". It will work correctly if the condition looks like this:
``` javascipt
var isWin = os.platform().search(/win/i) === 0;
```