docker-lemp-node/www/nodejs/node_modules/is-installed-globally/index.js
2022-03-27 18:02:38 +02:00

16 lines
342 B
JavaScript

'use strict';
const fs = require('fs');
const globalDirs = require('global-dirs');
const isPathInside = require('is-path-inside');
module.exports = (() => {
try {
return (
isPathInside(__dirname, globalDirs.yarn.packages) ||
isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages))
);
} catch {
return false;
}
})();