porsager / wright

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

Support other chromium browsers. #37

Closed blfunex closed 5 years ago

blfunex commented 5 years ago

After using flems for a bit, I'm hooked to the workflow. but I exclusively use Brave. so no Chrome for me, but Wright complains:

Can't find Chrome at:
"C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe"
If Chrome is installed somewhere else, set the environment variable CHROME_PATH

now I have to install google on my computer.

I hope it can be fixed 😄

Thanks for all your work @porsager, you are an inspiration.

porsager commented 5 years ago

Hi. Thank you for your kind words ;)

I've just tried the same on my computer, and if brave follows the chrome devtools api and startup arguments I think it should work, but for some reason fs.existsSync('C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe') returns false.. I've tried from a regular command prompt and also an elevated one with no difference.

I'm a bit short of time these days, but you can disable using HMR and just add --browser false if you are using wright@next.

If you want to dig into the issue above maybe try to figure out why the exists call returns false for the brave.exe path.

blfunex commented 5 years ago

Thanks I will pass, I'm a bit short of time also, so I installed chrome for this once, I will happily wait until this is fixed.

blfunex commented 5 years ago

I tried with node's REPL

fs.existsSync('C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe')

and it works 😆

blfunex commented 5 years ago

notice the \\

also my node has no administrator privileges

porsager commented 5 years ago

Hah.. Just had a few minutes to dig deeper, and it was a simple issue of a trailing whitespace from the windows env. set variable :D

I'll push a fix with trim() added and release a new 2.0 beta ;)