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

Don't reject on stderr for docker run #3754

Merged
merged 2 commits into from
Dec 12, 2022
Merged

Don't reject on stderr for docker run #3754

merged 2 commits into from
Dec 12, 2022

Conversation

bwateratmsft
Copy link
Collaborator

Fixes #3751

@bwateratmsft bwateratmsft added this to the 1.23.3 milestone Dec 7, 2022
@bwateratmsft bwateratmsft requested a review from a team as a code owner December 7, 2022 18:14
@@ -29,13 +29,21 @@ export async function execAsync(command: string, options?: cp.ExecOptions & { st
if (progress) {
stdoutIntermediate = new stream.PassThrough();
stdoutIntermediate.on('data', (chunk: Buffer) => {
progress(bufferToString(chunk), false);
try {
Copy link
Collaborator Author

@bwateratmsft bwateratmsft Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A sort of defense-in-depth; in case progress() decides to throw, it shouldn't get thrown out of this callback handler. Same for below.

karolz-ms
karolz-ms previously approved these changes Dec 7, 2022
src/utils/execAsync.ts Outdated Show resolved Hide resolved
@bwateratmsft bwateratmsft merged commit 92ab3c0 into main Dec 12, 2022
@bwateratmsft bwateratmsft deleted the bmw/dockerTaskBug branch December 12, 2022 15:20
@microsoft microsoft locked and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugging Docker Container -- Not properly attaching to container
4 participants