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

Commit 3ea3feb

Browse files
authored
Merge pull request #98 from adamburgess/tar-fs
replace tar with tar-fs
2 parents e06b547 + dd526b0 commit 3ea3feb

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

github.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var expandTilde = require('expand-tilde');
88
var Promise = require('bluebird');
99
var asp = require('bluebird').Promise.promisify;
1010

11-
var tar = require('tar');
11+
var tar = require('tar-fs');
1212
var zlib = require('zlib');
1313

1414
var semver = require('semver');
@@ -561,15 +561,13 @@ GithubLocation.prototype = {
561561

562562
pkgRes
563563
.pipe(gzip)
564-
.pipe(tar.Extract({
565-
path: outDir,
566-
strip: 1,
567-
filter: function() {
568-
return !this.type.match(/^.*Link$/);
564+
.pipe(tar.extract(outDir, {
565+
strip: 1,
566+
filter: function(_, header) {
567+
return header.type !== 'file' && header.type !== 'directory'
569568
}
570-
}))
571-
.on('error', reject)
572-
.on('end', resolve);
569+
}).on('finish', resolve).on('error', reject))
570+
.on('error', reject);
573571

574572
pkgRes.resume();
575573

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"request": "~2.53.0",
2525
"rimraf": "~2.3.2",
2626
"semver": "^5.0.1",
27-
"tar": "^2.2.1",
27+
"tar-fs": "^1.13.0",
2828
"which": "^1.0.9"
2929
},
3030
"homepage": "https://github.com/jspm/github",

0 commit comments

Comments
 (0)