Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix(git): fix .git exclusion, set mtime = 0 to make tarballs idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 10, 2017
1 parent 9f1f47c commit 9a9fa1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/handlers/git/tarball.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ function packDir (spec, label, tmp, target, opts) {
: tar.pack(tmp, {
map: header => {
header.name = 'package/' + header.name
header.mtime = 0 // make tarballs idempotent
},
ignore: (name) => {
name.match(/\.git/)
return name.match(/\.git/)
}
})

Expand Down
2 changes: 1 addition & 1 deletion lib/registry/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function manifest (spec, opts) {
err.code = 'ENOTARBALL'
err.manifest = manifest
if (!manifest._warnings) { manifest._warnings = [] }
manifest._warnings.push(err)
manifest._warnings.push(err.message)
manifest._resolved =
`${registry}/${manifest.name}/-/${manifest.name}-${manifest.version}.tgz`
}
Expand Down

0 comments on commit 9a9fa1b

Please sign in to comment.