I'm writing a cli to run on node. I'm going to distribute it using npm. I 
really like Chrome/Firefox's model of automatic updates.

Would it be a bad idea to simply call the following on startup, or right 
before the process ends?

require('child_process').exec('npm update -g package-name');

I honestly don't see why it wouldn't, assuming all users install through 
npm.

Anyway, don't want to mess this one up, but it's hard to test before 
deploying. Thought I'd ask the experts.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/7aff68b6-c98d-4fcf-9135-d9c5ce794941%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to