Skip to content

Commit f16e7e0

Browse files
committed
Fixed path bug
1 parent 523feb3 commit f16e7e0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const cp = require("child_process");
22
const fs = require("fs");
33
const system = require(__dirname + "/verify.js");
4-
if (!fs.existsSync(system.path)) cp.execSync(`node --no-warnings download.js ${system.url} ${process.platform}${process.arch}`, {cwd: process.cwd(), stdio: "inherit"});
4+
if (!fs.existsSync(system.path)) cp.execSync(`node --no-warnings ${__dirname}/download.js ${system.url} ${process.platform}${process.arch}`, {cwd: process.cwd(), stdio: "inherit"});
55
class FFmpeg {
66
static async run(cmd){
77
var temp = await new Promise((resolve, reject)=>{
@@ -18,9 +18,10 @@ class FFmpeg {
1818
return cp.execSync(`"${system.path}" ${cmd}`, {encoding: "utf8"});
1919
}
2020
}
21+
// Check for possible corruption
2122
try {
2223
FFmpeg.runSync("-version");
2324
} catch(err) {
24-
cp.execSync(`node download.js ${system.url} ${process.platform}${process.arch}`, {cwd: process.cwd(), stdio: "inherit"});
25+
cp.execSync(`node --no-warnings ${__dirname}/download.js ${system.url} ${process.platform}${process.arch}`, {cwd: process.cwd(), stdio: "inherit"});
2526
}
2627
module.exports = FFmpeg;

0 commit comments

Comments
 (0)