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:
parent
59df53fcad
commit
99d5290e49
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -81,6 +81,8 @@ jobs:
|
|||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: 'actions/checkout@v2'
|
- uses: 'actions/checkout@v2'
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 'Use Docker'
|
- name: 'Use Docker'
|
||||||
uses: 'actions-hub/docker/cli@master'
|
uses: 'actions-hub/docker/cli@master'
|
||||||
|
@ -29,10 +29,14 @@ export class GitAffected implements GitAffectedOptions {
|
|||||||
base: string,
|
base: string,
|
||||||
head: string
|
head: string
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
|
try {
|
||||||
const { stdout } = await execa.command(
|
const { stdout } = await execa.command(
|
||||||
`git diff --name-only --relative ${base} ${head}`
|
`git diff --name-only --relative ${base} ${head}`
|
||||||
)
|
)
|
||||||
return this.parseGitOutput(stdout)
|
return this.parseGitOutput(stdout)
|
||||||
|
} catch {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getUncommittedFiles (): Promise<string[]> {
|
public async getUncommittedFiles (): Promise<string[]> {
|
||||||
|
Loading…
Reference in New Issue
Block a user