Skip to content

Commit 4cf764d

Browse files
coeuvrecopybara-github
authored andcommitted
Properly handle invalid credential files
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
1 parent ed5e660 commit 4cf764d

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)