Fix errors when specifying absolute path

This commit is contained in:
David Golub 2018-12-07 17:20:05 -05:00 committed by Isaev Denis
parent 99329fb637
commit 7063a9d870

View File

@ -182,7 +182,7 @@ func (cl ContextLoader) buildArgs() []string {
var retArgs []string
for _, arg := range args {
if strings.HasPrefix(arg, ".") {
if strings.HasPrefix(arg, ".") || filepath.IsAbs(arg) {
retArgs = append(retArgs, arg)
} else {
// go/packages doesn't work well if we don't have prefix ./ for local packages