ktship / liteide

Automatically exported from code.google.com/p/liteide
0 stars 0 forks source link

mis-use of exec.LookPath #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/liteide/source/browse/liteidex/tools/gopromake/gobin.go
#86

Your code is: p.compiler, err = exec.LookPath(path.Join(gobin,p.compiler))
When it should be: p.compiler, err = exec.LookPath(p.compiler)

Giving LookPath an absolute path as a parameter completely defeats the purpose 
of the function. All this does is check if the compiler is exactly where you 
assume it to be - this function will either not change the value of p.compiler 
or it will replace it with the empty string.

Original issue reported on code.google.com by jasm...@gmail.com on 20 May 2011 at 10:37

GoogleCodeExporter commented 9 years ago
x5

Original comment by Visua...@gmail.com on 8 Jul 2011 at 8:33