Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
a3d64abe
Unverified
Commit
a3d64abe
authored
Aug 06, 2019
by
Joe Haddad
Committed by
GitHub
Aug 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swallow test process kill errors on win32 (#8260)
* Swallow process kill errors * Strictly look for messsage
parent
d4d5ad4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
next-test-utils.js
test/lib/next-test-utils.js
+16
-1
No files found.
test/lib/next-test-utils.js
View file @
a3d64abe
...
@@ -215,7 +215,22 @@ export function buildTS (args = [], cwd, env = {}) {
...
@@ -215,7 +215,22 @@ export function buildTS (args = [], cwd, env = {}) {
export
async
function
killApp
(
instance
)
{
export
async
function
killApp
(
instance
)
{
await
new
Promise
((
resolve
,
reject
)
=>
{
await
new
Promise
((
resolve
,
reject
)
=>
{
treeKill
(
instance
.
pid
,
err
=>
{
treeKill
(
instance
.
pid
,
err
=>
{
if
(
err
)
return
reject
(
err
)
if
(
err
)
{
if
(
process
.
platform
===
'win32'
&&
typeof
err
.
message
===
'string'
&&
err
.
message
.
includes
(
`no running instance of the task`
)
)
{
// Windows throws an error if the process is already dead
//
// Command failed: taskkill /pid 6924 /T /F
// ERROR: The process with PID 6924 (child process of PID 6736) could not be terminated.
// Reason: There is no running instance of the task.
return
resolve
()
}
return
reject
(
err
)
}
resolve
()
resolve
()
})
})
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment