fix(maker): spawn the zip command in the containing directory
ensures the generated zip file does not contain a massive system path
This commit is contained in:
Родитель
5a56efb914
Коммит
e909a0c4bd
|
@ -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', () => {});
|
||||
|
|
Загрузка…
Ссылка в новой задаче