This caused me serious problems when my npm config had the cache
location set to `C:\Users\Domenic\AppData\Roaming\npm-cache`, but my
`process.cwd()` value was `c:\Users\...`, i.e. the drive letter casing
was mismatched.
In general, the problem was that is-inside-this-directory checking was
done with `potentialChild.indexOf(parent) === 0`, which fails for case
-insensitive filesystems. Anyone who had manually configured their
cache or tmp location, without matching the system's casing exactly,
would have run into this problem.
In particular, the failure to use the correct detection method caused
npm to try to run prepublish scripts for *everything*.
Why did this manifest now? It may be a Node 0.11 issue, or perhaps a
Windows 8.1 one. My other computer, running Node 0.10 and Windows 8,
does not exhibit the lowercase `process.cwd()` value.
Previous code did not handle the cache dir's permissions consistently.
If the first lock was done as sudo, the cache directory was not user
writable.
Removed the now unnecessary guard and collapsed the then function.
Confusing to say 'this is being deleted' when that's the thing that
you're actually PUTTING there. Only print the unbuilt pkg when it's
an explicit uninstall/unbuild command.
If a project specifies git urls for dependencies these are shown
in parentheses after the name@version to make it easier for
users to recognize potential forks of a project.
Fixes#3570
With the change to maybeGithub where it now tries both the
public and private git uris we should allow
addRemoteGit to not print errors to stdout since that
function is now recoverable by means of retry.
We only call addRemoteGit with silent set to true the first time
and call it with silent set to false the second time
so that when the cloning process fails the second time
it will print to stdout/stderr
- Fixes#3076
- Will make namespace style lookups take a bit longer
- Will make it a LOT easier to install private repos. Now it's
`npm i Company/module` instead of remembering the
specific ssh uri dance.
Fix#3146
Version and name are still required to add to the cache folder,
or to publish, so you'll have to name your packages before installing
them in some other place.
However, this cleans up the process a bit for master branches and folks
using branches for releases that don't get folded back in.