File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const cp = require ( "child_process" ) ;
22const fs = require ( "fs" ) ;
33const 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" } ) ;
55class 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
2122try {
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}
2627module . exports = FFmpeg ;
You can’t perform that action at this time.
0 commit comments