init-package-json
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -202,3 +202,4 @@ /* globals config, dirname, package, basename, yes, prompt */ | ||
exports.repository = async () => { | ||
const gconf = await fs.readFile('.git/config', 'utf8').catch(() => '') | ||
const gitConfigPath = path.resolve(dirname, '.git', 'config') | ||
const gconf = await fs.readFile(gitConfigPath, 'utf8').catch(() => '') | ||
const lines = gconf.split(/\r?\n/) | ||
@@ -210,5 +211,5 @@ | ||
if (i !== -1) { | ||
url = gconf[i + 1] | ||
url = lines[i + 1] | ||
if (!url.match(/^\s*url =/)) { | ||
url = gconf[i + 2] | ||
url = lines[i + 2] | ||
} | ||
@@ -215,0 +216,0 @@ if (!url.match(/^\s*url =/)) { |
{ | ||
"name": "init-package-json", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"main": "lib/init-package-json.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13925
346