Guest User

Untitled

a guest
Jun 22nd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. if (!process.env.NODE_PATH) {
  2. console.log();
  3. if (process.env.SHELL === '/bin/zsh') {
  4. console.log(' Please set environment variable NODE_PATH in ~/.zshrc:');
  5. } else if (process.env.SHELL === '/bin/bash') {
  6. console.log(' Please set environment variable NODE_PATH in ~/.bashrc:');
  7. } else {
  8. console.log(' Please set environment variable NODE_PATH:');
  9. }
  10. console.log();
  11.  
  12. var nodepath = __dirname.replace(/(\/|\\)nico(\/|\\)bin$/, '');
  13. if (/node_modules$/.test(nodepath) && !fs.existsSync(path.join(nodepath, '.bin'))) {
  14. if (os.platform() === 'win32') {
  15. console.log(' NODE_PATH=' + nodepath);
  16. } else {
  17. console.log(' export NODE_PATH=' + nodepath);
  18. }
  19. }
  20. console.log();
  21. process.exit();
  22. }
Add Comment
Please, Sign In to add comment