Skip to content

Commit eb11d55

Browse files
authored
fix: Windows should now kill tasks properly
* fix: retry unsupported taskkill operations with alternative method * update contributing readme to refer to cli-testing-library repo
1 parent 4e77f64 commit eb11d55

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Thanks for being willing to contribute!
1212
> requests from branches on your fork. To do this, run:
1313
>
1414
> ```
15-
> git remote add upstream https://github.com/testing-library/dom-testing-library.git
15+
> git remote add upstream https://github.com/crutchcorn/cli-testing-library.git
1616
> git fetch upstream
1717
> git branch --set-upstream-to=upstream/main main
1818
> ```

src/process-helpers.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ export const killProc = (instance: TestInstance, signal: string | undefined) =>
2121
}
2222
if (
2323
err.message.includes('could not be terminated') &&
24-
err.message.includes('There is no running instance of the task.')
24+
err.message.includes('There is no running instance of the task.') &&
25+
instance.hasExit()
2526
) {
27+
resolve()
28+
return
29+
}
30+
const isOperationNotSupported = err.message.includes('The operation attempted is not supported.');
31+
const isAccessDenied = err.message.includes('Access is denied.');
32+
if (err.message.includes('could not be terminated') && (isOperationNotSupported || isAccessDenied)) {
2633
const sleep = (t: number) => new Promise(r => setTimeout(r, t))
2734
await sleep(getConfig().errorDebounceTimeout)
2835
if (instance.hasExit()) {

0 commit comments

Comments
 (0)