From 19250e7aed5d0f8c85bbd8116e43ed1265b8eeab Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 12 Dec 2010 19:35:46 -0800 Subject: 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. --- cli.js | 9 --------- 1 file changed, 9 deletions(-) (limited to 'cli.js') diff --git a/cli.js b/cli.js index 7eb3b34ea..849daba94 100755 --- a/cli.js +++ b/cli.js @@ -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") -- cgit v1.2.3