Skip to content
Permalink
Browse files

fix(maker): spawn the zip command in the containing directory

ensures the generated zip file does not contain a massive system path
  • Loading branch information
MarshallOfSound authored and Samuel Attard committed Dec 5, 2016
1 parent 5a56efb commit e909a0c4bdf09a9b17de56772806fcfc476d833c
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/makers/generic/zip.js
@@ -7,7 +7,9 @@ import { ensureFile } from '../../util/ensure-output';

const zipPromise = (from, to) =>
new Promise((resolve, reject) => {
const child = spawn('zip', ['-r', '-y', to, from]);
const child = spawn('zip', ['-r', '-y', to, path.basename(from)], {
cwd: path.dirname(from),
});

child.stdout.on('data', () => {});
child.stderr.on('data', () => {});

0 comments on commit e909a0c

Please sign in to comment.
You can’t perform that action at this time.