diff options
author | cspotcode <cspotcode@gmail.com> | 2011-10-07 06:50:12 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-07 22:42:54 +0400 |
commit | 70ffc1510d27c3dd596c98cf674e3e5ea29b1ff9 (patch) | |
tree | 94d21e099abb54c9af2eb3e70e4ea2d89be129d1 /lib | |
parent | b0466d96864f46dae1377922b2f90ac090ebbb33 (diff) |
Fix #1488 pass filenames to tar through stdin
avoids too-long command line
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/tar.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/tar.js b/lib/utils/tar.js index 651d8fd3d..b730e3875 100644 --- a/lib/utils/tar.js +++ b/lib/utils/tar.js @@ -72,7 +72,7 @@ function packFiles (targetTarball, parent, files, pkg, cb) { }) var target = fs.createWriteStream(targetTarball) , unPacked = false - , args = [ "-czvf", "-"].concat(files) + , args = [ "-czvf", "-", "-T", "-"] , tarEnv = {} for (var i in process.env) { tarEnv[i] = process.env[i] @@ -89,6 +89,8 @@ function packFiles (targetTarball, parent, files, pkg, cb) { , args, tarEnv, false, parent) , errState tar.name = "tar -czvf - <file list elided>" + tar.stdin.write(files.join("\n")) + tar.stdin.end() tar.stdout.pipe(target) target.on("close", function (er, ok) { if (errState) return |