fix: handle nothing to commit when autocrlf is set

This commit is contained in:
Peter Evans 2022-08-17 16:42:05 +09:00
parent 20dac2ed48
commit 5b21f2e254
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(