mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
fix(cli): improve error handling in run test
command
This commit is contained in:
@ -29,10 +29,14 @@ export class GitAffected implements GitAffectedOptions {
|
||||
base: string,
|
||||
head: string
|
||||
): Promise<string[]> {
|
||||
const { stdout } = await execa.command(
|
||||
`git diff --name-only --relative ${base} ${head}`
|
||||
)
|
||||
return this.parseGitOutput(stdout)
|
||||
try {
|
||||
const { stdout } = await execa.command(
|
||||
`git diff --name-only --relative ${base} ${head}`
|
||||
)
|
||||
return this.parseGitOutput(stdout)
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
public async getUncommittedFiles (): Promise<string[]> {
|
||||
|
Reference in New Issue
Block a user