Comparing version 1.0.0 to 1.1.0
30
index.js
'use strict'; | ||
var exec = require('child_process').exec; | ||
var npmconf = require('npmconf'); | ||
var fullname; | ||
@@ -19,2 +20,15 @@ var first = true; | ||
npmconf.load(function (err, conf) { | ||
fullname = conf.get('init.author.name'); | ||
if (err || !fullname) { | ||
fallback(cb); | ||
return; | ||
} | ||
cb(null, fullname); | ||
}); | ||
}; | ||
function fallback (cb) { | ||
if (process.platform === 'darwin') { | ||
@@ -37,5 +51,5 @@ exec('id -P', function (err, stdout) { | ||
return; | ||
} else { | ||
cb(null, fullname); | ||
} | ||
cb(null, fullname); | ||
}); | ||
@@ -62,5 +76,6 @@ | ||
}); | ||
} else { | ||
cb(null, fullname); | ||
return; | ||
} | ||
cb(null, fullname); | ||
}); | ||
@@ -85,6 +100,7 @@ | ||
}); | ||
} else { | ||
cb(null, fullname); | ||
return; | ||
} | ||
cb(null, fullname); | ||
}); | ||
}; | ||
} |
{ | ||
"name": "fullname", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Get the fullname of the current user", | ||
@@ -43,2 +43,5 @@ "license": "MIT", | ||
], | ||
"dependencies": { | ||
"npmconf": "^2.1.1" | ||
}, | ||
"devDependencies": { | ||
@@ -45,0 +48,0 @@ "mocha": "*" |
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
5058
5
105
1
+ Addednpmconf@^2.1.1
+ Addedabbrev@1.1.1(transitive)
+ Addedconfig-chain@1.1.13(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addednopt@3.0.6(transitive)
+ Addednpmconf@2.1.3(transitive)
+ Addedonce@1.3.3(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedproto-list@1.2.4(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@4.3.6(transitive)
+ Addeduid-number@0.0.5(transitive)
+ Addedwrappy@1.0.2(transitive)