porsager / wright

🚀 Work Fast Work Wright
Do What The F*ck You Want To Public License
180 stars 15 forks source link

False negative for Chrome reported when configuring wright in Ubuntu 16.04.2 #23

Closed orbitbot closed 7 years ago

orbitbot commented 7 years ago

Setting up a wright toolchain on Ubuntu 16.04.2 is giving me a false negative for locating google-chrome with the error message:

Wright requires Chrome and can't seem to find it at:
google-chrome

However google-chrome is on the path and installed, running the command manually will open a new Chrome window as expected.

orbitbot commented 7 years ago

The culprit is basically this line: https://github.com/porsager/wright/blob/master/lib/utils.js#L90 , that tries to find a file called google-chrome in the current working directory (whatever that may be when running the wright command. The correct solution would be to do essentially which google-chrome, in bash that will return the filepath of the right hand command that is on the $PATH.

orbitbot commented 7 years ago

Apparently there's a node module for which, that could perhaps replace a lot of the custom code in that part of utils.js, or at least provide the required functionality on Linux without running a shell command.

porsager commented 7 years ago

Hey Patrick. Thanks :) It's been a while since I tested on linux.

I just went through a clean setup on Ubuntu 16.04 with the latest fixes, and it should work as expected now.