Closed iamolivinius closed 11 years ago
No problems on Ubuntu 13.04 and the same node and grunt versions.
Running grunt open
doesn't work neither.
Debugging step by step with node-inspector leds to normal behavior. After line number 915 a new browser window pops up and loads www.google.com
C:\Users\Oliver\Desktop\tester>node --debug-brk C:\Users\Oliver\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt open
I looked into this enough to confirm and see what's going on, but debugging in a windows 8 vm is not going very quickly for me.
I wonder if it has anything to do with the parent exiting normally very quickly after doing the 'open' since that is executed and grunt moves on. On a watch spawn and grunt open
that would be very quick, but open
before watch
would cause grunt to stay open longer, as would debugging.
I'd test making this an async task with an arbitrary setTimeout beforring moving on, but my windows VM just started installing three hundred thousand updates.
Feel free to try setTimeout(this.async(), 200);
before or after the call to open and see if that helps. I'll try as soon as my VM's updated.
Well, ... you nailed it!
awesome, i'll publish something today. Thanks for your help and info, this would have taken ages for me to troubleshoot.
published in 0.2.1
This is a minimal example to point out the problem.
Assuming a basic grunt installation exists, copy these three files in an empty folder and run
npm install
. Next rungrunt
. Now a browser should open and load "www.google.com". Then modify and save thetest.coffee
file. The browser should openwww.google.de
every time you modify the filetest.coffee
.On my system Windows8 x64, node v0.10.13, and grunt v0.4.1 just the first open before "watching" is executed properly.
Gruntfile.coffee
package.json
test.coffee