is-installed-globally
Advanced tools
Comparing version 0.3.1 to 0.3.2
13
index.js
@@ -6,4 +6,11 @@ 'use strict'; | ||
module.exports = | ||
isPathInside(__dirname, globalDirs.yarn.packages) || | ||
isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages)); | ||
module.exports = (() => { | ||
try { | ||
return ( | ||
isPathInside(__dirname, globalDirs.yarn.packages) || | ||
isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages)) | ||
); | ||
} catch (_) { | ||
return false; | ||
} | ||
})(); |
{ | ||
"name": "is-installed-globally", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Check if your package was installed globally", | ||
"license": "MIT", | ||
"repository": "sindresorhus/is-installed-globally", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
@@ -12,3 +13,2 @@ "name": "Sindre Sorhus", | ||
}, | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"engines": { | ||
@@ -15,0 +15,0 @@ "node": ">=8" |
3748
29