🐛 Use command line options when calling patcher-installer

This commit is contained in:
C-3PO 2018-09-14 00:50:59 +02:00
parent e22c27aa31
commit a605e78715
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -7,12 +7,12 @@ const processPath = path.join(__dirname, '../../lib/patcher-installer');
export default function launchProcess(diskFile: string, offset: number, compressedSize: number, decryptionKeys: [number, number, number] | undefined, outputStream: fs.WriteStream) {
return new Promise((resolve, reject) => {
const parameters = [
diskFile,
offset,
compressedSize,
'--disk', diskFile,
'--offset', offset,
'--size', compressedSize,
];
if (decryptionKeys !== undefined) {
parameters.push(...decryptionKeys);
parameters.push('--keys', ...decryptionKeys);
}
const spawnedProcess = childProcess.spawn(processPath, parameters.map((value) => value.toString(), { cwd: '.' }));