Detect local or global in install script?

48 views
Skip to first unread message

Tony Lukasavage

unread,
Jan 18, 2014, 12:50:01 PM1/18/14
to nod...@googlegroups.com
As the subject states, is there a way to detect whether an npm install script was invoked via a local npm install or a global (-g) install? 

Nathan Rajlich

unread,
Jan 18, 2014, 7:22:10 PM1/18/14
to nodejs
IIRC it'll be the "npm_config_global" env variable (note, lowercase).


On Sat, Jan 18, 2014 at 9:50 AM, Tony Lukasavage <anthony.l...@gmail.com> wrote:
As the subject states, is there a way to detect whether an npm install script was invoked via a local npm install or a global (-g) install? 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tony Lukasavage

unread,
Jan 27, 2014, 1:08:47 PM1/27/14
to nod...@googlegroups.com
Yup, that's the one. Thanks Nathan.


You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/e9djCII0vYo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Tony Lukasavage
twitter: @tonylukasavage
skype: tonylukasavage
phone: (412) 860-3770
Reply all
Reply to author
Forward
0 new messages