Fix up serve task

This commit is contained in:
Tom Coleman 2022-10-06 15:27:59 +11:00
parent 4154353083
commit 399192119b

View File

@ -12,10 +12,10 @@ export const serve: Task = {
async ready() {
return (await detectFreePort(PORT)) !== PORT;
},
async run({ sandboxDir, codeDir }, { debug, dryRun }) {
async run({ builtSandboxDir, codeDir }, { debug, dryRun }) {
const controller = new AbortController();
exec(
`yarn http-server ${sandboxDir} --port ${PORT}`,
`yarn http-server ${builtSandboxDir} --port ${PORT}`,
{ cwd: codeDir },
{ dryRun, debug, signal: controller.signal as AbortSignal }
).catch((err) => {