From abd1a8e9c059bd05a01280741a49f9ad6da7a8e6 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 15 Sep 2014 09:22:49 +0800 Subject: [PATCH] . --- editor/editors.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/editors.go b/editor/editors.go index 1f69886..d0b79f5 100644 --- a/editor/editors.go +++ b/editor/editors.go @@ -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)