Skip to content

Commit da6f01e

Browse files
committed
Addressing comments
1 parent 4ee91ef commit da6f01e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/core/src/amazonqTest/chat/controller/controller.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ export class TestController {
13141314
'Deleting output.log and temp result directory. testGenerationLogsDir: %s',
13151315
testGenerationLogsDir
13161316
)
1317-
if (await fs.existsFile(path.join(testGenerationLogsDir, 'output.log'))) {
1318-
await fs.delete(path.join(testGenerationLogsDir, 'output.log'))
1317+
const outputLogPath = path.join(testGenerationLogsDir, 'output.log')
1318+
if (await fs.existsFile(outputLogPath)) {
1319+
await fs.delete(outputLogPath)
13191320
}
13201321
if (
13211322
await fs

packages/core/src/codewhisperer/commands/startTestGeneration.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ export async function startTestGenerationProcess(
7575
try {
7676
artifactMap = await getPresignedUrlAndUploadTestGen(zipMetadata)
7777
} finally {
78-
if (await fs.existsFile(path.join(testGenerationLogsDir, 'output.log'))) {
79-
await fs.delete(path.join(testGenerationLogsDir, 'output.log'))
78+
const outputLogPath = path.join(testGenerationLogsDir, 'output.log')
79+
if (await fs.existsFile(outputLogPath)) {
80+
await fs.delete(outputLogPath)
8081
}
8182
await zipUtil.removeTmpFiles(zipMetadata)
8283
session.artifactsUploadDuration = performance.now() - uploadStartTime

0 commit comments

Comments
 (0)