We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff5a15a commit ad48c76Copy full SHA for ad48c76
warn/warn_bazel_api.go
@@ -180,8 +180,8 @@ var moduleToApparentRepoName func(string) string
180
// useApparentRepoNameIfExternal replaces the module name in a load statement with the apparent repository
181
// name used by the root Bazel module (if any).
182
func useApparentRepoNameIfExternal(load string, fileReader *FileReader) string {
183
- if !strings.HasPrefix(load, "@") {
184
- // Not a load from an external repository.
+ if !strings.HasPrefix(load, "@") || fileReader == nil {
+ // Not a load from an external repository or we can't load external files.
185
return load
186
}
187
if moduleToApparentRepoName == nil {
0 commit comments