diff --git a/src/vcs-provider.ts b/src/vcs-provider.ts index 1404281..5ac78a4 100644 --- a/src/vcs-provider.ts +++ b/src/vcs-provider.ts @@ -54,6 +54,7 @@ export async function gitsvnRevision(file: string, workspace: string): Promise { if (error) { reject(`Could not retrieve SVN revision for file: ${file}. Error(s): ${stderr}`); + return; } const revRegex = /^Last Changed Rev: (\d+)\s*$/gm; @@ -63,11 +64,14 @@ export async function gitsvnRevision(file: string, workspace: string): Promise } case VcsKind.svn: { - return new Promise((resolve, reject) => { - svnRevision(file, workspace).then((revision: number) => resolve(`${revision}`)); - }); + let revision = await svnRevision(file, workspace); + return `${revision}`; } case VcsKind.gitsvn: { - return new Promise((resolve, reject) => { - gitsvnRevision(file, workspace).then((revision: number) => resolve(`${revision}`)); - }); + let revision = await gitsvnRevision(file, workspace); + return `${revision}`; } default: