From 6a3428e6d29cd61f2d809984acb6716e69cf27a4 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 7 Apr 2017 11:09:15 -0400 Subject: [PATCH] Fixes #57 - no more blank message w/o a diff.tool --- src/git/git.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/git/git.ts b/src/git/git.ts index 0da908a..21e6f67 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -150,8 +150,13 @@ export class Git { return gitCommand(repoPath, ...params); } - static config_get(key: string, repoPath?: string) { - return gitCommand(repoPath || '', `config`, `--get`, key); + static async config_get(key: string, repoPath?: string) { + try { + return await gitCommand(repoPath || '', `config`, `--get`, key); + } + catch (ex) { + return ''; + } } static diff_nameStatus(repoPath: string, sha1?: string, sha2?: string) {