diff --git a/tools/cdk-integ-tools/lib/integ-helpers.ts b/tools/cdk-integ-tools/lib/integ-helpers.ts index 0848b144c2fa7..199b75d07da61 100644 --- a/tools/cdk-integ-tools/lib/integ-helpers.ts +++ b/tools/cdk-integ-tools/lib/integ-helpers.ts @@ -147,8 +147,10 @@ export class IntegrationTest { if (fs.existsSync(this.cdkContextPath)) { fs.unlinkSync(this.cdkContextPath); } - if (fs.existsSync('cdk.out')) { - fs.removeSync('cdk.out'); + + const cdkOutPath = path.join(this.directory, 'cdk.out'); + if (fs.existsSync(cdkOutPath)) { + fs.removeSync(cdkOutPath); } }