Skip to content

Commit

Permalink
fix(gitDir): Fix for checking if task contains git.exe on Windows (#…
Browse files Browse the repository at this point in the history
…178)

git detection didn't take file extension into consideration which caused an error when using git task on windows
  • Loading branch information
nataly87s authored and okonet committed May 29, 2017
1 parent 4a91ff4 commit 4c60017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runScript.js
Expand Up @@ -30,7 +30,7 @@ module.exports = function runScript(commands, pathsToLint, packageJson, options)
// Only use gitDir as CWD if we are using the git binary
// e.g `npm` should run tasks in the actual CWD
const execaOptions =
res.bin.endsWith('git') && options && options.gitDir
/git(\.exe)?$/i.test(res.bin) && options && options.gitDir
? { cwd: options.gitDir } : {}

const errors = []
Expand Down

0 comments on commit 4c60017

Please sign in to comment.