Browse Source

Fixes #4 - Absolute paths fail on Windows due to backslash

main
Eric Amodio 8 years ago
parent
commit
87215850b7
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/git.ts

+ 1
- 2
src/git.ts View File

@ -11,8 +11,7 @@ function gitCommand(cwd: string, ...args) {
export default class Git {
static normalizePath(fileName: string, repoPath: string) {
fileName = fileName.replace(/\\/g, '/');
return isAbsolute(fileName) ? relative(repoPath, fileName) : fileName;
return (isAbsolute(fileName) ? relative(repoPath, fileName) : fileName).replace(/\\/g, '/');
}
static repoPath(cwd: string) {

Loading…
Cancel
Save