enhance runtime dependencies scout
This commit is contained in:
parent
f288d76eb9
commit
869ca61809
|
@ -277,7 +277,7 @@ func checkEnv() {
|
||||||
if nil != err {
|
if nil != err {
|
||||||
event.EventQueue <- &event.Event{Code: event.EvtCodeGocodeNotFound}
|
event.EventQueue <- &event.Event{Code: event.EvtCodeGocodeNotFound}
|
||||||
|
|
||||||
logger.Warnf("Not found gocode [%s]", gocode)
|
logger.Warnf("Not found gocode [%s], please install it with this command: go get github.com/nsf/gocode", gocode)
|
||||||
}
|
}
|
||||||
|
|
||||||
ideStub := util.Go.GetExecutableInGOBIN("ide_stub")
|
ideStub := util.Go.GetExecutableInGOBIN("ide_stub")
|
||||||
|
@ -286,7 +286,7 @@ func checkEnv() {
|
||||||
if nil != err {
|
if nil != err {
|
||||||
event.EventQueue <- &event.Event{Code: event.EvtCodeIDEStubNotFound}
|
event.EventQueue <- &event.Event{Code: event.EvtCodeIDEStubNotFound}
|
||||||
|
|
||||||
logger.Warnf("Not found ide_stub [%s]", ideStub)
|
logger.Warnf("Not found ide_stub [%s], please install it with this command: go get github.com/88250/ide_stub", ideStub)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
util/go.go
10
util/go.go
|
@ -100,5 +100,13 @@ func (*mygo) GetExecutableInGOBIN(executable string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// $GOBIN/executable
|
// $GOBIN/executable
|
||||||
return os.Getenv("GOBIN") + pathSeparator + executable
|
gobin := os.Getenv("GOBIN")
|
||||||
|
if "" != gobin {
|
||||||
|
ret = gobin + pathSeparator + executable
|
||||||
|
if File.IsExist(ret) {
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "./" + executable
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue