diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5415da2..368af30 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Thanks for being willing to contribute! > requests from branches on your fork. To do this, run: > > ``` -> git remote add upstream https://github.com/testing-library/dom-testing-library.git +> git remote add upstream https://github.com/crutchcorn/cli-testing-library.git > git fetch upstream > git branch --set-upstream-to=upstream/main main > ``` diff --git a/src/process-helpers.ts b/src/process-helpers.ts index f515d44..6d2989c 100644 --- a/src/process-helpers.ts +++ b/src/process-helpers.ts @@ -21,8 +21,15 @@ export const killProc = (instance: TestInstance, signal: string | undefined) => } if ( err.message.includes('could not be terminated') && - err.message.includes('There is no running instance of the task.') + err.message.includes('There is no running instance of the task.') && + instance.hasExit() ) { + resolve() + return + } + const isOperationNotSupported = err.message.includes('The operation attempted is not supported.'); + const isAccessDenied = err.message.includes('Access is denied.'); + if (err.message.includes('could not be terminated') && (isOperationNotSupported || isAccessDenied)) { const sleep = (t: number) => new Promise(r => setTimeout(r, t)) await sleep(getConfig().errorDebounceTimeout) if (instance.hasExit()) {