sindresorhus / gulp-zip

ZIP compress files
MIT License
270 stars 47 forks source link

Prevent adding the zipped file into the archive #60

Closed 84564221 closed 8 years ago

84564221 commented 8 years ago

All my zips include an zero-byte archive with the same filename (build.zip).

$ node -v
v4.2.3
/home/batman/dev/arkham_routing_app

Files:

deploy/
  files/
    application.jar
    pics/
      buddies/
        robin.jpg
    icon.svg
    LICENSE
  bin/
const deployDir = "./deploy";
return gulp.src('**/*', { base: deployDir + '/files', cwd: deployDir + '/files/' })
        // Compress the shebang
        .pipe(zip('build.zip'))
        .pipe(gulp.dest(deployDir + '/bin'));

Result (zip content):

home/
  batman/
    dev/
      arkham_routing_app/
        deploy/
          bin/
            build.zip
application.jar
pics/
  buddies/
    robin.jpg
icon.svg
LICENSE

Expected result:

application.jar
pics/
  buddies/
    robin.jpg
icon.svg
LICENSE
sindresorhus commented 8 years ago

Try using gulp-debug to ensure the correct files are passed into this.

I don't have time to debug this issue, but will take a look if someone submits a failing test.

84564221 commented 8 years ago

https://bugzilla.gnome.org/show_bug.cgi?id=757793