diff options
author | isaacs <i@izs.me> | 2012-03-13 20:57:21 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-13 20:57:21 +0400 |
commit | 0f026a1f8796e1e0b691f901edb5510454003f5b (patch) | |
tree | ea24324d38416f2b6010a5c59d6c0c23cdc5d011 | |
parent | 6d6990c39b254d807a7e39d7444322814f962148 (diff) |
Don't clobber executable flags
-rw-r--r-- | lib/utils/tar.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/utils/tar.js b/lib/utils/tar.js index b43ba1a2d..9a97ee280 100644 --- a/lib/utils/tar.js +++ b/lib/utils/tar.js @@ -214,9 +214,13 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { function extractEntry (entry) { // never create things that are user-unreadable, // or dirs that are user-un-listable. Only leads to headaches. + var originalMode = entry.mode = entry.mode || entry.props.mode entry.mode = entry.mode | (entry.type === "Directory" ? dMode : fMode) entry.mode = entry.mode & (~npm.modes.umask) entry.props.mode = entry.mode + if (originalMode !== entry.mode) { + log.silly([entry.path, originalMode, entry.mode], "modified mode") + } // if there's a specific owner uid/gid that we want, then set that if (process.platform !== "win32" && |