1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00

fix(cli): improve error handling in run test command

This commit is contained in:
Divlo 2021-06-25 13:02:34 +02:00
parent 59df53fcad
commit 99d5290e49
No known key found for this signature in database
GPG Key ID: 185ED2F15F104E52
2 changed files with 10 additions and 4 deletions

View File

@ -81,6 +81,8 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v2'
with:
fetch-depth: 0
- name: 'Use Docker'
uses: 'actions-hub/docker/cli@master'

View File

@ -29,10 +29,14 @@ export class GitAffected implements GitAffectedOptions {
base: string,
head: string
): Promise<string[]> {
try {
const { stdout } = await execa.command(
`git diff --name-only --relative ${base} ${head}`
)
return this.parseGitOutput(stdout)
} catch {
return []
}
}
public async getUncommittedFiles (): Promise<string[]> {