skip node_modules when copying

This commit is contained in:
Chris Wanstrath 2026-02-02 16:09:55 -08:00
parent 52bfa783e1
commit ed200431f2

View File

@ -158,7 +158,10 @@ router.post('/apps/:app/deploy', c => {
const currentReal = existsSync(currentLink) ? realpathSync(currentLink) : null
if (currentReal) {
cpSync(currentReal, newVersion, { recursive: true })
cpSync(currentReal, newVersion, {
recursive: true,
filter: (src) => !src.split('/').includes('node_modules'),
})
} else {
// First deployment - create directory
mkdirSync(newVersion, { recursive: true })