Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.3.0] [credentialhelper] Ignore all errors when writing stdin #18540

Merged
merged 2 commits into from
May 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ public GetCredentialsResponse getCredentials(CredentialHelperEnvironment environ
GSON.toJson(GetCredentialsRequest.newBuilder().setUri(uri).build(), stdin);
} catch (IOException e) {
// This can happen if the helper prints a static set of credentials without reading from
// stdin (e.g., with a simple shell script running `echo "{...}"`). If the process is
// already finished even though we failed to write to its stdin, ignore the error and
// assume the process did not need the request payload.
if (!process.finished()) {
throw e;
}
// stdin (e.g., with a simple shell script running `echo "{...}"`). This is fine to
// ignore.
}

try {
Expand Down