Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #98 from adamburgess/tar-fs
Browse files Browse the repository at this point in the history
replace tar with tar-fs
  • Loading branch information
guybedford authored Jul 15, 2016
2 parents e06b547 + dd526b0 commit 3ea3feb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions github.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var expandTilde = require('expand-tilde');
var Promise = require('bluebird');
var asp = require('bluebird').Promise.promisify;

var tar = require('tar');
var tar = require('tar-fs');
var zlib = require('zlib');

var semver = require('semver');
Expand Down Expand Up @@ -561,15 +561,13 @@ GithubLocation.prototype = {

pkgRes
.pipe(gzip)
.pipe(tar.Extract({
path: outDir,
strip: 1,
filter: function() {
return !this.type.match(/^.*Link$/);
.pipe(tar.extract(outDir, {
strip: 1,
filter: function(_, header) {
return header.type !== 'file' && header.type !== 'directory'
}
}))
.on('error', reject)
.on('end', resolve);
}).on('finish', resolve).on('error', reject))
.on('error', reject);

pkgRes.resume();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"request": "~2.53.0",
"rimraf": "~2.3.2",
"semver": "^5.0.1",
"tar": "^2.2.1",
"tar-fs": "^1.13.0",
"which": "^1.0.9"
},
"homepage": "https://github.com/jspm/github",
Expand Down

0 comments on commit 3ea3feb

Please sign in to comment.