Skip to content

Commit

Permalink
FLEXY-4848: Print process status on reject
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeet-tw committed Oct 31, 2023
1 parent f9fc3db commit 670b5fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/flex-plugin-e2e-tests/src/utils/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ export const killChildProcess = async (
logger.info(message);
})
.catch(async (error) => {
logger.error(`error killing the process, error message is: ${error}`);
logger.info("Trying second time to kill the process");
await promisifiedSpawn('taskkill', ['/pid', `${child.pid}`, '/f', '/t']);
logger.error(`Error killing the process, error message is: ${error}`);
logger.error(`Check is Process status: ${error}`);
await promisifiedSpawn('tasklist', ['/v', '/fi', `PID eq ${child.pid}`]);
// logger.info("Trying second time to kill the process");
// await promisifiedSpawn('taskkill', ['/pid', `${child.pid}`, '/f', '/t']);
});
} else {
child.kill();
Expand Down

0 comments on commit 670b5fb

Please sign in to comment.