Skip to content

Commit

Permalink
fix(maker): spawn the zip command in the containing directory
Browse files Browse the repository at this point in the history
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 e909a0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/makers/generic/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {});
Expand Down

0 comments on commit e909a0c

Please sign in to comment.