Merge pull request #239 from its-pointless/moshfront
[termux-packages] / packages / nodejs / npm-avoid-chown.patch
1 Termux is effectively a single-user system so chown:ing
2 does not make much sense.
3
4 Without this patch npm fails with EPERM on chown
5 for cache.json when first building the local index.
6 diff -u -r ../node-v0.12.7/deps/npm/lib/cache/update-index.js ./deps/npm/lib/cache/update-index.js
7 --- ../node-v0.12.7/deps/npm/lib/cache/update-index.js 2015-07-09 18:41:19.000000000 -0400
8 +++ ./deps/npm/lib/cache/update-index.js 2015-07-24 20:45:21.078116384 -0400
9 @@ -4,7 +4,7 @@
10 var assert = require('assert')
11 var path = require('path')
12 var mkdir = require('mkdirp')
13 -var chownr = require('chownr')
14 +var chownr = function(path, uid, gid, cb) { cb(null); }
15 var npm = require('../npm.js')
16 var log = require('npmlog')
17 var cacheFile = require('npm-cache-filename')