Closed bencevans closed 9 years ago
In README's I'd suggest longform options (--global rather than -g) as for users that arn't used to npm etc might get a better idea.
Ideally sudo shouldn't be used when installing modules either. Stick them in userland! :D
On Mon, Jun 1, 2015 at 3:55 PM, Chris Ball notifications@github.com wrote:
@bencevans Thanks! Perhaps this should be sudo npm install -g gittorrent?
— Reply to this email directly or view it on GitHub.
Ah, that's fair. But won't it just fail for everyone by trying to write to /usr/local, when you use --global but not sudo?
@cjb It depends on how you have setup your system. Personally I have setup so my current user owns /usr/local
But the point of the README is to explain how to install npm modules to people who don't already know, and those people are very likely not to have set up their system to make --global work without sudo.
It seems like it would make more sense to include sudo in the instructions, and then people who've done as @ralphtheninja did will know that it's safe for them to remove the sudo.
Or perhaps write something like
$ [sudo] npm i -g gittorrent
I'd say the convention is to just write npm i -g xyz
to inform the user that it's a global install and leave up the user to decide if he/she needs to do sudo or not.
Why not
add the --global flag to install globally (may require superuser privileges)
If this is only meant as a cli tool it should always be installed globally imo.
@cjb Or is this meant to be used as a dependency as well?
@bencevans Thanks for the patch! I'll merge this, add a sudo, and add a note explaining that you can avoid using sudo if you get the binaries into your $PATH.
:+1:
Sweet! On 2 Jun 2015 17:32, "Chris Ball" notifications@github.com wrote:
@bencevans https://github.com/bencevans Thanks for the patch! I'll merge this, add a sudo, and add a note explaining that you can avoid using sudo if you get the binaries into your $PATH.
— Reply to this email directly or view it on GitHub https://github.com/cjb/GitTorrent/pull/30#issuecomment-108007475.
@bencevans Thanks! Perhaps this should be
sudo npm install -g gittorrent
?