DisposaBoy / GoSublime

A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.
MIT License
3.42k stars 302 forks source link

Mac gosublime : Cross Compile #937

Closed miobook closed 5 years ago

miobook commented 5 years ago

Can't cross compile? Is there a problem with the settings?

err info: [ GOOS=windows GOARCH=amd64 go build | done ] GOOS=windows GOARCH=amd64 go build exited: exec: "GOOS=windows": executable file not found in $PATH

[ GOOS=linux GOARCH=amd64 go build test.go | done ] GOOS=linux GOARCH=amd64 go build test.go exited: exec: "GOOS=linux": executable file not found in $PATH

Thanks!

DisposaBoy commented 5 years ago

It doesn't run the command in your shell, so if you need shell features like ENV=xxx cmd... you need to use sh cmd e.g. sh GOOS=linux GOARCH=amd64 go build test.go.

See also https://github.com/DisposaBoy/GoSublime/blob/development/9o.md#command-modes

miobook commented 5 years ago

It doesn't run the command in your shell, so if you need shell features like ENV=xxx cmd... you need to use sh cmd e.g. sh GOOS=linux GOARCH=amd64 go build test.go.

See also https://github.com/DisposaBoy/GoSublime/blob/development/9o.md#command-modes

OK! Thank you