This repository was archived by the owner on Jan 17, 2021. It is now read-only.
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,12 @@ chmod +x ` + codeServerPath
225
225
226
226
func openBrowser (url string ) {
227
227
var openCmd * exec.Cmd
228
+
229
+ const (
230
+ macPath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
231
+ wslPath = "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"
232
+ )
233
+
228
234
switch {
229
235
case commandExists ("google-chrome" ):
230
236
openCmd = exec .Command ("google-chrome" , chromeOptions (url )... )
@@ -234,8 +240,10 @@ func openBrowser(url string) {
234
240
openCmd = exec .Command ("chromium" , chromeOptions (url )... )
235
241
case commandExists ("chromium-browser" ):
236
242
openCmd = exec .Command ("chromium-browser" , chromeOptions (url )... )
237
- case pathExists ("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" ):
238
- openCmd = exec .Command ("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" , chromeOptions (url )... )
243
+ case pathExists (macPath ):
244
+ openCmd = exec .Command (macPath , chromeOptions (url )... )
245
+ case pathExists (wslPath ):
246
+ openCmd = exec .Command (wslPath , chromeOptions (url )... )
239
247
default :
240
248
err := browser .OpenURL (url )
241
249
if err != nil {
You can’t perform that action at this time.
0 commit comments