Skip to content

Commit 94bf5e5

Browse files
authored
find files outside of plz-out first (#338)
1 parent e177bfb commit 94bf5e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/driver/packages/packages.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ func packagesToResponse(rootpath string, pkgs []*packages.Package, dirs map[stri
157157
for i, file := range pkg.GoFiles {
158158
// This is pretty awkward; we need to try to figure out where these files exist now,
159159
// which isn't particularly clear to the build actions that generated them.
160-
if path := filepath.Join(rootpath, "plz-out/subrepos", file); pathExists(path) {
160+
if pathExists(file) {
161+
pkg.GoFiles[i] = filepath.Join(rootpath, file)
162+
} else if path := filepath.Join(rootpath, "plz-out/subrepos", file); pathExists(path) {
161163
pkg.GoFiles[i] = path
162164
} else if path := filepath.Join(rootpath, "plz-out/gen", file); pathExists(path) {
163165
pkg.GoFiles[i] = path
164-
} else {
165-
pkg.GoFiles[i] = filepath.Join(rootpath, file)
166166
}
167167
}
168168
pkg.CompiledGoFiles = pkg.GoFiles

0 commit comments

Comments
 (0)