I use Safari as default browser on my OS X but I want use Chrome as default for Grunt connect and watch so i follow the steps i found on this blog. Everything ok if i set 'Google Chrome Canary' or 'Firefox' as 'app' parameter in grunt open options but if i try to use 'Google Chrome' a virtualized app on Chrome starting on Parallel's Windows version! How can I say to grunt to use not Google Chrome on Parallels but on my Mac OS X?
Asked
Active
Viewed 1,694 times
1
-
I know that I can resolve it removing shared application on Parallels settings but i want keep application shared folder and i want just say to grunt to use Chrome os OS X instead the one on Parallels. – Luca Pipolo Dec 04 '15 at 17:57
1 Answers
0
Looking at open's source on line 31 it opens using this code:
opener = 'open -a "' + escape(appName) + '"';
Try using the full path to the chrome you want to use as the app parameter for the grunt task. You can play around with it from the terminal by entering in open -a /some/path/to/chrome
so you do not have to run the whole grunt task.
-
Great! Yes if I use `grunt open -a /Applications/Google \Chrome` from terminal Grunt open my OS X version of Google Chrome. How can I add this options to Gruntfile.js so i can use it with `grunt serve` command? – Luca Pipolo Dec 05 '15 at 17:18
-
-
No man, it doesn't work. Grunt open says: `Warning: Command failed: /bin/sh -c open -a "/Applications/Google\ Chrome" "http://localhost:9000" FSPathMakeRef(/Applications/Google\ Chrome) failed with error -43.` – Luca Pipolo Dec 12 '15 at 14:24
-
I changed the execution flag using `sudo chmod +x /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome` but the error of grunt open is the same: `Warning: Command failed: /bin/sh -c open -a "Applications/Google\ Chrome" "http://localhost:9000"` – Luca Pipolo Dec 14 '15 at 15:25