From 0ee09d9d87c9906192a2e8d03d3b19cb87ac90e5 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 14 Sep 2016 13:31:57 -0400 Subject: [PATCH] Fixes #4 - Absolute paths fail on Windows due to backslash Hopefully for real this time --- src/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git.ts b/src/git.ts index 2b56c9a..b06e60b 100644 --- a/src/git.ts +++ b/src/git.ts @@ -30,7 +30,7 @@ export default class Git { } static repoPath(cwd: string) { - return gitCommand(cwd, 'rev-parse', '--show-toplevel').then(data => data.replace(/\r?\n|\r/g, '')); + return gitCommand(cwd, 'rev-parse', '--show-toplevel').then(data => data.replace(/\r?\n|\r/g, '').replace(/\\/g, '/')); } static blame(fileName: string, repoPath: string, sha?: string) {