Skip to content

Commit

Permalink
fix(core): serve + test --watch executor should not exit immediately
Browse files Browse the repository at this point in the history
closes #96
  • Loading branch information
AgentEnder committed Aug 26, 2021
1 parent bfd7649 commit 8484202
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/core/src/executors/serve/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function dotnetRunExecutor(
);
}

const runDotnetRun = (
const runDotnetRun = async (
dotnetClient: DotNetClient,
project: string,
options: ServeExecutorSchema,
Expand All @@ -47,9 +47,8 @@ const runDotnetRun = (
}));

childProcess = dotnetClient.run(project, true, opts);
return handleChildProcessPassthrough(childProcess).then(async () => {
await rimraf(projectDirectory + '/bin');
await rimraf(projectDirectory + '/obj');
return { success: true };
});
await handleChildProcessPassthrough(childProcess);
await rimraf(projectDirectory + '/bin');
await rimraf(projectDirectory + '/obj');
return { success: true };
};
4 changes: 4 additions & 0 deletions packages/utils/src/lib/utility-functions/childprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ export async function handleChildProcessPassthrough(

//catches uncaught exceptions
process.on('uncaughtException', exitHandler);

return new Promise<void>((resolve) => {
resolver = resolve;
});
}

0 comments on commit 8484202

Please sign in to comment.