0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Ignored node_modules dir when archiving (#10969)

fixes #10929
This commit is contained in:
Sumedh Nimkarde 2019-08-06 13:47:41 +05:30 committed by Fabien O'Carroll
parent 494e0d14a0
commit 167e1ead2e

View file

@ -18,8 +18,10 @@ module.exports = function zipFolder(folderToZip, destination, callback) {
archive.on('error', function (err) {
callback(err, null);
});
archive.directory(folderToZip, '/');
archive.glob(`**/*`, {
cwd: folderToZip,
ignore: ['node_modules/**']
});
archive.pipe(output);
archive.finalize();
};