Skip to content

Commit

Permalink
Fix for #1
Browse files Browse the repository at this point in the history
Linux needs the base path, too
  • Loading branch information
derjust committed Jun 20, 2020
1 parent 19fbe59 commit 2e978ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const cwd = 'dist/'
const folderPath = '**';
const out = 'cloudspout-button-panel.zip';

glob(folderPath, {cwd, nodir:true}, (err, files) => {
glob(folderPath, {cwd}, (err, files) => {

if (err) {
console.error(err);
Expand All @@ -17,6 +17,8 @@ glob(folderPath, {cwd, nodir:true}, (err, files) => {
const archive = archiver('zip', {zlib:{level: 9}});
archive.pipe(output);

// Linux needs the root folder itself
archive.file(cwd, {name:'cloudspout-button-panel/'})
files.forEach(file => {
if (file === out) return;
console.log(file);
Expand All @@ -26,5 +28,3 @@ glob(folderPath, {cwd, nodir:true}, (err, files) => {
archive.finalize();

});


0 comments on commit 2e978ac

Please sign in to comment.