Fix 7zip compression

pull/111/head
Piero Toffanin 2020-02-05 11:23:08 -05:00
rodzic df7dc5a9cd
commit f9c264aa04
3 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -117,7 +117,7 @@ config.maxConcurrency = parseInt(argv.max_concurrency || fromConfigFile("maxConc
config.maxRuntime = parseInt(argv.max_runtime || fromConfigFile("maxRuntime", -1));
// Detect 7z availability
// const childProcess = spawnSync("7z", ['--help']);
config.has7z = false; //childProcess.status === 0;
const childProcess = spawnSync("7z", ['--help']);
config.has7z = childProcess.status === 0;
module.exports = config;

Wyświetl plik

@ -901,9 +901,9 @@ if (config.test) {
if (config.testDropUploads) logger.info("Uploads will drop at random");
}
// if (!config.has7z){
// logger.warn("The 7z program is not installed, falling back to legacy (zipping will be slower)");
// }
if (!config.has7z){
logger.warn("The 7z program is not installed, falling back to legacy (zipping will be slower)");
}
let commands = [
cb => odmInfo.initialize(cb),

Wyświetl plik

@ -76,6 +76,9 @@ function makeRunner(command, args, requiredOptions = [], outputTestFile = null,
if (outputReceived !== undefined){
childProcess.stdout.on('data', chunk => outputReceived(chunk.toString()));
childProcess.stderr.on('data', chunk => outputReceived(chunk.toString()));
}else{
childProcess.stdout.on('data', () => {});
childProcess.stderr.on('data', () => {});
}
return childProcess;
@ -90,7 +93,7 @@ module.exports = {
["projectFolderPath"]),
sevenZip: makeRunner("7z", function(options){
return ["a", "-r", "-bd", options.destination].concat(options.pathsToArchive);
return ["a", "-mx=0", "-r", "-bd", options.destination].concat(options.pathsToArchive);
},
["destination", "pathsToArchive", "cwd"],
null,