You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 satır
346B

  1. 'use strict';
  2. const fs = require('fs');
  3. const globalDirs = require('global-dirs');
  4. const isPathInside = require('is-path-inside');
  5. module.exports = (() => {
  6. try {
  7. return (
  8. isPathInside(__dirname, globalDirs.yarn.packages) ||
  9. isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages))
  10. );
  11. } catch (_) {
  12. return false;
  13. }
  14. })();