Skip to content

Commit c3b5b72

Browse files
committed
ci: ignore all Windows process kill errors
When using ramdisk we now get different errors some times ``` ERROR: The process with PID 3804 (child process of PID 7516) could not be terminated. Reason: The operation attempted is not supported. ```
1 parent 085a852 commit c3b5b72

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/legacy-cli/e2e/utils/process.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,13 @@ export async function killAllProcesses(signal = 'SIGTERM'): Promise<void> {
205205
}
206206

207207
processesToKill.push(
208-
new Promise<void>((resolve, reject) => {
209-
treeKill(childProc.pid, signal, (err) => {
210-
if (err && !err.message.includes('not found')) {
211-
// Ignore process not found errors.
212-
// This is due to a race condition with the `waitForMatch` logic.
213-
// where promises are resolved on matches and not when the process terminates.
214-
reject(err);
215-
} else {
216-
resolve();
217-
}
208+
new Promise<void>((resolve) => {
209+
treeKill(childProc.pid, signal, () => {
210+
// Ignore all errors.
211+
// This is due to a race condition with the `waitForMatch` logic.
212+
// where promises are resolved on matches and not when the process terminates.
213+
// Also in some cases in windows we get `The operation attempted is not supported`.
214+
resolve();
218215
});
219216
}),
220217
);

0 commit comments

Comments
 (0)