Ensuring that the last parameter is parsed - fixes tests

This commit is contained in:
Paul Kinlan 2020-04-14 01:57:55 +01:00
parent dcdc8c8e83
commit b35eeba94c

View File

@ -72,6 +72,10 @@ const parseArgs = (command) => {
args.push(arg)
}
if (prevDelimiter != command.length) {
args.push(command.substring(prevDelimiter))
}
return args;
}
@ -83,7 +87,7 @@ const run = ({
if (Module === null) {
throw NO_LOAD_ERROR;
} else {
const args = [...defaultArgs, ...parseArgs(_args))].filter((s) => s.length !== 0);
const args = [...defaultArgs, ...parseArgs(_args)].filter((s) => s.length !== 0);
ffmpeg(args.length, strList2ptr(Module, args));
res.resolve({
message: `Complete ${args.join(' ')}`,