Skip to content

Commit

Permalink
version: .git is not required to be a directory.
Browse files Browse the repository at this point in the history
In a submodule it is actually a file with a line in it that tells
git where to find the actual .git directory.

PR-URL: npm/npm#9033
  • Loading branch information
Kyle M. Tarplee authored and iarna committed Aug 1, 2015
1 parent b3c0e86 commit 7587ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function dump (data, cb) {

function checkGit (localData, cb) {
fs.stat(path.join(npm.localPrefix, '.git'), function (er, s) {
var doGit = !er && s.isDirectory() && npm.config.get('git-tag-version')
var doGit = !er && npm.config.get('git-tag-version')
if (!doGit) {
if (er) log.verbose('version', 'error checking for .git', er)
log.verbose('version', 'not tagging in git')
Expand Down

0 comments on commit 7587ba3

Please sign in to comment.