Output on global args will now override specific output

This commit is contained in:
Tzahi12345
2020-05-03 21:14:09 -04:00
parent 8e5db3e9d1
commit a3424f973e

View File

@@ -1535,6 +1535,11 @@ async function generateArgs(url, type, options) {
if (globalArgs && globalArgs !== '') {
// adds global args
if (downloadConfig.indexOf('-o') !== -1 && globalArgs.split(',,').indexOf('-o') !== -1) {
// if global args has an output, replce the original output with that of global args
const original_output_index = downloadConfig.indexOf('-o');
downloadConfig.splice(original_output_index, 2);
}
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
}