mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Merge branch 'master' of github.com:bestiejs/lodash
Former-commit-id: 502c65ac38876c5fe42c9c652ef4cb237e9c631a
This commit is contained in:
@@ -25,6 +25,9 @@
|
|||||||
/** The media type for raw blob data */
|
/** The media type for raw blob data */
|
||||||
var mediaType = 'application/vnd.github.v3.raw';
|
var mediaType = 'application/vnd.github.v3.raw';
|
||||||
|
|
||||||
|
/** Reassign `existsSync` for older versions of Node */
|
||||||
|
fs.existsSync || (fs.existsSync = path.existsSync);
|
||||||
|
|
||||||
/** Used to reference parts of the blob href */
|
/** Used to reference parts of the blob href */
|
||||||
var location = (function() {
|
var location = (function() {
|
||||||
var host = 'api.github.com',
|
var host = 'api.github.com',
|
||||||
@@ -101,7 +104,8 @@
|
|||||||
exec('npm -g root', function(exception, stdout) {
|
exec('npm -g root', function(exception, stdout) {
|
||||||
if (!exception) {
|
if (!exception) {
|
||||||
try {
|
try {
|
||||||
var isGlobal = path.resolve(basePath, '..') == fs.realpathSync(stdout.trim());
|
var root = stdout.trim(),
|
||||||
|
isGlobal = fs.existsSync(root) && path.resolve(basePath, '..') == fs.realpathSync(root);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
exception = e;
|
exception = e;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user