Skip to content

Commit 28312a9

Browse files
iancha1992coeuvre
andauthored
Properly handle invalid credential files (#18779)
to prevent Bazel sever from crashing. The functions used to construct credentials could throw runtime exception which will crash Bazel server in which case the Bazel client will just exit silently. Fixes #18755. Closes #18770. PiperOrigin-RevId: 543413376 Change-Id: I71238345f350caaac51f9cc9f654661a90cf6737 Co-authored-by: Chi Wang <[email protected]>
1 parent 7541379 commit 28312a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public static Credentials newGoogleCredentialsFromFile(
330330
creds = creds.createScoped(authScopes);
331331
}
332332
return creds;
333-
} catch (IOException e) {
333+
} catch (Exception e) {
334334
String message = "Failed to init auth credentials: " + e.getMessage();
335335
throw new IOException(message, e);
336336
}

0 commit comments

Comments
 (0)