Skip to content

Commit fe08191

Browse files
committed
undo changes to other file
1 parent 36c0f07 commit fe08191

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ export async function zipCode({ dependenciesFolder, humanInTheLoopFlag, modulePa
354354

355355
tempFilePath = path.join(os.tmpdir(), 'zipped-code.zip')
356356
await fs.writeFile(tempFilePath, zip.toBuffer())
357-
await fs.delete(dependenciesFolder.path, { recursive: true, force: true })
357+
if (await fs.exists(dependenciesFolder.path)) {
358+
await fs.delete(dependenciesFolder.path, { recursive: true, force: true })
359+
}
358360
} catch (e: any) {
359361
throw Error('Failed to zip project')
360362
} finally {

0 commit comments

Comments
 (0)