diff options
author | isaacs <i@izs.me> | 2010-12-13 06:35:46 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-12-13 07:45:34 +0300 |
commit | 19250e7aed5d0f8c85bbd8116e43ed1265b8eeab (patch) | |
tree | abdc65847090e03e6b5a814d22bec5d28e0be5ea /cli.js | |
parent | 72ccb2ee43bc8927c2bcf0c8902676c581385dd8 (diff) |
Use effective location of node as execPath.
Do the `which`-style execp lookup for something matching argv[0] if it's
not absolute, and then use THAT as the effective execPath instead of the
*actual* execPath.
This should provide some ways to work around odd situations that arise
when node is installed with other package managers, particularly
Homebrew.
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -4,15 +4,6 @@ var log = require("./lib/utils/log") log.waitForConfig() log.info("ok", "it worked if it ends with") -if (__filename.match(/Cellar\/npm\/[^\/]+\/libexec\/cli.js$/) - ||process.execPath.match(/Cellar\/node\/[^\/]+\/bin\/node$/)) { - log.warn("This program is not compatible with Homebrew." - +"\n brew rm npm ; brew rm node" - +"\nThen use one of the techniques in this gist instead:" - +"\nhttps://gist.github.com/579814", "brew incompatible") -} - - var fs = require("./lib/utils/graceful-fs") , path = require("path") , sys = require("./lib/utils/sys") |