fix: handle nothing to commit when autocrlf is set (#1211)

This commit is contained in:
Peter Evans 2022-08-18 17:20:00 +09:00 committed by GitHub
parent 20dac2ed48
commit 2721abb4d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 6 deletions

View file

@ -53,7 +53,10 @@ export class GitCommandManager {
return await this.exec(args, allowAllExitCodes)
}
async commit(options?: string[]): Promise<void> {
async commit(
options?: string[],
allowAllExitCodes = false
): Promise<GitOutput> {
const args = ['commit']
if (this.identityGitOptions) {
args.unshift(...this.identityGitOptions)
@ -63,7 +66,7 @@ export class GitCommandManager {
args.push(...options)
}
await this.exec(args)
return await this.exec(args, allowAllExitCodes)
}
async config(