Skip to content

Commit 203a60c

Browse files
authored
Merge pull request #7 from PotatoParser/chmod
Chmod
2 parents 347fe72 + 30ba888 commit 203a60c

5 files changed

Lines changed: 12 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
22
os:
33
- "linux"
4+
- "osx"
45
node_js:
56
- "lts/*"
67
- 11

lib/download.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ async function getPackage(){
6565
console.log('Renaming files');
6666
fs.renameSync(temp, system.typePath);
6767

68+
console.log('Applying chmod');
69+
fs.readdirSync(system.pathDir, { withFileTypes: true }).forEach(f => {
70+
if (!f.isDirectory()) {
71+
console.log(`${system.pathDir}/${f.name}`);
72+
fs.chmodSync(`${system.pathDir}/${f.name}`, '777');
73+
}
74+
});
75+
6876
console.log('FFmpeg downloaded!');
6977
}
7078

lib/system.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ module.exports.typePath = path.normalize(rootDir + '/ffmpeg/' + OS + BIT);
3939
module.exports.zipPath = path.normalize(rootDir + '/ffmpeg/' + module.exports.url.substring(module.exports.url.lastIndexOf('/')+1));
4040
module.exports.rootDir = rootDir;
4141
module.exports.path = path.normalize(module.exports.path);
42+
module.exports.pathDir = path.dirname(module.exports.path);

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ffmpeg-cli",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "ffmpeg with support for multiple OSs",
55
"main": "./lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)