This commit is contained in:
Liang Ding 2014-09-15 09:22:49 +08:00
parent 91550d41e3
commit abd1a8e9c0
1 changed files with 4 additions and 1 deletions

View File

@ -275,7 +275,10 @@ func FindUsagesHandler(w http.ResponseWriter, r *http.Request) {
// TODO: 目前是调用 liteide_stub 工具来查找使用,后续需要重新实现
argv := []string{"type", "-cursor", filename + ":" + strconv.Itoa(offset), "-use", "."}
cmd := exec.Command("liteide_stub", argv...)
ide_stub := os.Getenv("GOPATH") + string(os.PathSeparator) +
os.Getenv("OS") + string(os.PathSeparator) + os.Getenv("GOARCH") + string(os.PathSeparator) + "ide_stub"
cmd := exec.Command(ide_stub, argv...)
cmd.Dir = curDir
setCmdEnv(cmd, username)