Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit d921072

Browse files
committed
Merge pull request #25 from finnp/switch-tar
Option to switch extract and pack functions
2 parents e608873 + 6ba000d commit d921072

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ exports.pack = function (cwd, opts) {
6363
var strict = opts.strict !== false
6464
var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0
6565
var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0
66-
var pack = tar.pack()
66+
var pack = opts.pack || tar.pack()
6767

6868
if (opts.strip) map = strip(map, opts.strip)
6969

@@ -164,7 +164,7 @@ exports.extract = function (cwd, opts) {
164164
var map = opts.map || noop
165165
var mapStream = opts.mapStream || echo
166166
var own = opts.chown !== false && !win32 && processGetuid() === 0
167-
var extract = tar.extract()
167+
var extract = opts.extract || tar.extract()
168168
var stack = []
169169
var now = new Date()
170170
var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask()

0 commit comments

Comments
 (0)