Skip to content

Commit 43dfa92

Browse files
Wyveraldcopybara-github
authored andcommitted
Fix NPE in NewRepositoryFileHandler
Accidentally introduced in bazelbuild@bf9a3d4. PiperOrigin-RevId: 671517799 Change-Id: Iea6b372a501fe13390404e7af30f83c22679e809
1 parent 17634e6 commit 43dfa92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/google/devtools/build/lib/rules/repository/NewRepositoryFileHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ public boolean prepareFile(Rule rule, Environment env)
115115
} else if (hasFile) {
116116

117117
Pair<RootedPath, FileValue> rootedPathAndFileValue = getFileValue(rule, env);
118-
rootedPath = rootedPathAndFileValue.getFirst();
119-
fileValue = rootedPathAndFileValue.getSecond();
120118
if (env.valuesMissing()) {
121119
return false;
122120
}
121+
rootedPath = rootedPathAndFileValue.getFirst();
122+
fileValue = rootedPathAndFileValue.getSecond();
123123

124124
} else if (hasFileContent) {
125125

0 commit comments

Comments
 (0)