Skip to content

Commit

Permalink
fix: normalize gitDir path for Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Iiro Jäppinen authored and okonet committed Jun 6, 2019
1 parent 9871389 commit 90e343b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolveGitDir.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict'

const execGit = require('./execGit')
const path = require('path')
const printErrors = require('./printErrors')

module.exports = async function resolveGitDir() {
try {
const gitDir = await execGit(['rev-parse', '--show-toplevel'])
return gitDir
return path.normalize(gitDir)
} catch (error) {
printErrors(error)
return null
Expand Down

0 comments on commit 90e343b

Please sign in to comment.