From a91461f27cf124f8818bb4a4643a37963871fdc8 Mon Sep 17 00:00:00 2001 From: "Bakel, Roel van" Date: Mon, 7 Oct 2019 15:35:15 +0200 Subject: [PATCH] Don't log error message if git tagging is disabled PR-URL: https://github.com/npm/cli/pull/263 Credit: @woppa684 Close: #263 Reviewed-by: @mikemimik --- lib/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/version.js b/lib/version.js index 0f1e97aedd403..a8c2a648c7473 100644 --- a/lib/version.js +++ b/lib/version.js @@ -256,7 +256,7 @@ function checkGit (localData, cb) { statGitFolder(function (er) { var doGit = !er && npm.config.get('git-tag-version') if (!doGit) { - if (er) log.verbose('version', 'error checking for .git', er) + if (er && npm.config.get('git-tag-version')) log.verbose('version', 'error checking for .git', er) log.verbose('version', 'not tagging in git') return cb(null, false) }