parent
a129ac0240
commit
55234af08f
2 changed files with 2650 additions and 4 deletions
|
@ -174,9 +174,8 @@ function checkInputConflicts(videoUrls: Array<string | number> | undefined,
|
||||||
|
|
||||||
|
|
||||||
function isOutputTemplateValid(argv: any): boolean {
|
function isOutputTemplateValid(argv: any): boolean {
|
||||||
let finalTemplate: string = argv.outputTemplate;
|
|
||||||
const elementRegEx = RegExp(/{(.*?)}/g);
|
const elementRegEx = RegExp(/{(.*?)}/g);
|
||||||
let match = elementRegEx.exec(finalTemplate);
|
let match = elementRegEx.exec(argv.outputTemplate);
|
||||||
|
|
||||||
// if no template elements this fails
|
// if no template elements this fails
|
||||||
if (match) {
|
if (match) {
|
||||||
|
@ -191,11 +190,11 @@ function isOutputTemplateValid(argv: any): boolean {
|
||||||
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
match = elementRegEx.exec(finalTemplate);
|
match = elementRegEx.exec(argv.outputTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argv.outputTemplate = sanitize(finalTemplate.trim());
|
argv.outputTemplate = sanitize(argv.outputTemplate.trim());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue