Ensuring that the last parameter is parsed - fixes tests
This commit is contained in:
		
							parent
							
								
									dcdc8c8e83
								
							
						
					
					
						commit
						b35eeba94c
					
				@ -72,6 +72,10 @@ const parseArgs = (command) => {
 | 
				
			|||||||
    args.push(arg)
 | 
					    args.push(arg)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (prevDelimiter != command.length) {
 | 
				
			||||||
 | 
					    args.push(command.substring(prevDelimiter))
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return args;
 | 
					  return args;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -83,7 +87,7 @@ const run = ({
 | 
				
			|||||||
  if (Module === null) {
 | 
					  if (Module === null) {
 | 
				
			||||||
    throw NO_LOAD_ERROR;
 | 
					    throw NO_LOAD_ERROR;
 | 
				
			||||||
  } else {
 | 
					  } 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));
 | 
					    ffmpeg(args.length, strList2ptr(Module, args));
 | 
				
			||||||
    res.resolve({
 | 
					    res.resolve({
 | 
				
			||||||
      message: `Complete ${args.join(' ')}`,
 | 
					      message: `Complete ${args.join(' ')}`,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user