Skip to content

Commit

Permalink
fix: catch git error on commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Feb 25, 2022
1 parent 42b4080 commit fe78ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simpleGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class SimpleGit extends GitManager {
async commit(message?: string): Promise<number> {
this.plugin.setState(PluginState.commit);

const res = (await this.git.commit(await this.formatCommitMessage(message))).summary.changes;
const res = (await this.git.commit(await this.formatCommitMessage(message), (err) => this.onError(err))).summary.changes;
this.plugin.setState(PluginState.idle);
return res;

Expand Down

0 comments on commit fe78ae3

Please sign in to comment.