Skip to content

[@rushstack/package-deps-hash] Wait for stream close when async executing git commands #4711

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

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
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
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/package-deps-hash",
"comment": "Fix an issue where an incomplete repo state analysis was sometimes returned, especially on WSL. See https://github.com/microsoft/rushstack/pull/4711 for details.",
"type": "patch"
}
],
"packageName": "@rushstack/package-deps-hash"
}
2 changes: 1 addition & 1 deletion libraries/package-deps-hash/src/getRepoState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async function spawnGitAsync(
pipeline(stdin, proc.stdin!, (err) => {});
}

const [status] = await once(proc, 'exit');
const [status] = await once(proc, 'close');
if (status !== 0) {
throw new Error(`git ${args[0]} exited with code ${status}: ${stderr}`);
}
Expand Down
Loading