diff --git a/backend/src/webhook/github.ts b/backend/src/webhook/github.ts index 0c41dc728..69b0ccc73 100644 --- a/backend/src/webhook/github.ts +++ b/backend/src/webhook/github.ts @@ -18,6 +18,7 @@ export const githubWebhook = async (req: any, res: any): Promise => { console.log(payload) if (payload.ref === `refs/heads/${CONFIG.WEBHOOK_GITHUB_BRANCH}`) { + // spawn shell and detach process to allow killing of parent process in the update script const child = spawn( path.join(__dirname, '../../../deployment/bare_metal/start.sh'), [CONFIG.WEBHOOK_GITHUB_BRANCH], @@ -26,7 +27,6 @@ export const githubWebhook = async (req: any, res: any): Promise => { stdio: ['ignore', 'ignore', 'ignore'], }, ) - // detach process to allow killing of parent process in the update script child.unref() } }