Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm install on a git remote uses global templates resulting in badness #5867

Closed
boneskull opened this issue Aug 3, 2014 · 0 comments
Closed

Comments

@boneskull
Copy link
Contributor

So in add-remote-git.js, npm will git clone the URL you give it. When it does this, Git will want to use global templates (hooks/, description, etc) by default.

If those global templates happen to be symlinks to files unwritable by the current user, npm install will fail. See debug log.

This may be an uncommon setup, but it may be more common as of late--I got this error because I installed GitHub.app for Mac with user A, then attempted to npm install git://foo with user B. GitHub.app provides some global templates, and those templates are symlinks to files within /Applications/GitHub.app/Contents/Resources/git/share/git-core/templates/, of course, owned by user A.

I reported this problem to GitHub and, while this may be questionable app behavior, I could see similar instances of this problem cropping up on shared systems; possibly, read-only global hooks set by some fascist sysadmin. We determined the problem was with how npm install was cloning repos.

I have a fix; PR forthcoming.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants