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

Commit

Permalink
set permissions after git clone, fix #3117
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaakko Manninen authored and isaacs committed Mar 4, 2013
1 parent ef01b62 commit 48263bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ var mkdir = require("mkdirp")
, crypto = require("crypto")
, retry = require("retry")
, zlib = require("zlib")
, chmodr = require("chmodr")

cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
Expand Down Expand Up @@ -408,7 +409,12 @@ function addRemoteGit (u, parsed, name, cb_) {

p = path.join(npm.config.get("cache"), "_git-remotes", v)

checkGitDir(p, u, co, origUrl, cb)
checkGitDir(p, u, co, origUrl, function(er, data) {
chmodr(p, npm.modes.file, function(erChmod) {
if (er) return cb(er, data)
return cb(erChmod, data)
})
})
})
}

Expand Down

0 comments on commit 48263bf

Please sign in to comment.