Skip to content

Commit c033fd1

Browse files
authored
fix: do not assume errors on the CLI (#81)
1 parent e27b91a commit c033fd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commands/installAnalysisCLI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const execAsync = (command: string) => {
3030
return
3131
}
3232

33-
if (stderr && (!stdout || /error|fail|exception/i.test(stderr))) {
33+
if (stderr && !stdout) {
3434
reject(new Error(stderr))
3535
return
3636
}

src/commands/runCodacyAnalyze.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export async function runCodacyAnalyze(filePath?: string) {
5050
return
5151
}
5252

53-
if (stderr && (!stdout || /error|fail|exception/i.test(stderr))) {
53+
if (stderr && !stdout) {
5454
Logger.warn(`Codacy CLI V2 warnings: ${stderr}`)
5555
}
5656

0 commit comments

Comments
 (0)