Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 2e58c48

Browse files
Kyle M. Tarpleezkat
authored andcommitted
version: .git is not required to be a directory.
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: #9033
1 parent d204683 commit 2e58c48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function dump (data, cb) {
141141

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

0 commit comments

Comments
 (0)