diff --git a/src/installer-rp/pack.ts b/src/installer-rp/pack.ts index 47aa8b4..01ea052 100644 --- a/src/installer-rp/pack.ts +++ b/src/installer-rp/pack.ts @@ -99,9 +99,9 @@ function zipDirectory(srcDir: string, outZipPath: string): Promise { const archive = archiver('zip', { zlib: { level: 9 } }) output.on('close', () => resolve()) output.on('error', reject) - archive.on('warning', (err) => { + archive.on('warning', (err: Error & { code?: string }) => { // ENOENT 정도면 무시, 그 외는 reject. - if ((err as NodeJS.ErrnoException).code === 'ENOENT') return + if (err.code === 'ENOENT') return reject(err) }) archive.on('error', reject)