GoSublime icon indicating copy to clipboard operation
GoSublime copied to clipboard

Configure for WSL

Open ghost opened this issue 7 years ago • 1 comments

Hello,

It would be nice if GoSublime could be configured to use WSL (Windows Subsystem for Linux). I've tried the following settings but am coming up with errors. It appears to still try to install the windows flavor, even though I'm specifying Linux. I should mention I'm using the debian WSL version.

Settings

{
	"shell": ["C:/Windows/System32/bash.exe", "--login", "-c", "${CMD}"],
	"env": {
		"shell": "/bin/bash",
		"GOROOT": "/usr/local/go",
		"GOPATH": "/mnt/c/Users/hawk/go"
	}
}

Error:

| GoSublime error: MarGo build failed
|                > This is possibly a bug or miss-configuration of your environment.
|                > For more help, please file an issue with the following build output
|                > at: https://github.com/DisposaBoy/GoSublime/issues/new
|                > or alternatively, you may send an email to: [email protected]
|                > 
|                > 
|                > cmd: `['', 'build', '-tags', '', '-v', '-o', 'gosublime.margo_r18.03.23-1_go?.exe', 'gosublime/cmd/margo']`
|                > stdout: `
|                > 
|                > `
|                > stderr: `
|                > 
|                > `
|                > exception: `Cannot find command `go``
|   install state: busy
| sublime.version: 3143
| sublime.channel: stable
|       about.ann: a18.03.23-1
|   about.version: r18.03.23-1
|         version: r18.03.23-1
|        platform: windows-x64
|            ~bin: ~\AppData\Roaming\Sublime Text 3\Packages\User\GoSublime\windows-x64\bin
|       margo.exe: ~bin\gosublime.margo_r18.03.23-1_go?.exe (missing)
|          go.exe: go (missing)
|      go.version: go?
|          GOROOT: /usr/local/go
|          GOPATH: /mnt/c/Users/hawk/go
|           GOBIN: (not set)
|       set.shell: ['C:/Windows/System32/bash.exe', '--login', '-c', '${CMD}']
|       env.shell: 
|       shell.cmd: ['C:/Windows/System32/bash.exe', '--login', '-c', '${CMD}']
|    sh.bootstrap: 
|                > 	error building gosubl\sh-bootstrap.go: stat gosublsh-bootstrap.go: no such file or directory
|                > 
|                > 	error running bin\gosubl-sh-bootstrap.exe: /bin/bash: bingosubl-sh-bootstrap.exe: command not found
|                > 
|                > 	go version: `` (raw version string ``)
|                > 	shell bootstrap took 1.124s
|                > 

ghost avatar Mar 24 '18 17:03 ghost

I believe this specific issue can be fixed, but the rest of the code is just gonna call the go command directly and bring us back to square 1.

I plan to make the new version of margo run from inside of rkt, docker, etc. but there are no solid plans for that yet; maybe I can re-visit this when that happens.

DisposaBoy avatar Mar 24 '18 21:03 DisposaBoy