Skip to content

Commit

Permalink
better version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed Jan 20, 2024
1 parent 3554590 commit a3d0cad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ exports.info = () => {
}
let str = data.toString("utf8");
logger.info("stdout:", str);
let m = /^(\S+).*?v.*?((?:\d+\.)+\d+)/.exec(str);
if (m) {
let words = str.split(" ");
if (words[0] == "ffmpeg" && words[1] == "version") {
done = true;
resolve({
program: m[1],
version: m[2],
program: "ffmpeg",
version: words[2],
converterBinary: ffmpeg,
});
}
Expand Down

0 comments on commit a3d0cad

Please sign in to comment.