Skip to content
This repository was archived by the owner on Sep 18, 2018. It is now read-only.

Commit 943aafd

Browse files
committed
Chmod only if file exists.
1 parent 0e481f5 commit 943aafd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

php-webkit/main.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ var phpwebkit = {
2727
bin = 'php-cgi';
2828
}
2929
}
30-
31-
// set the permissions to be able to execute
32-
fs.chmodSync(process.cwd() + bin.slice(1), 0755);
30+
var path = process.cwd() + bin.slice(1);
31+
if(fs.existsSync(path)){
32+
// set the permissions to be able to execute
33+
fs.chmodSync(path, 0755);
34+
}
3335

3436
this.fileExists(bin, function(result){
3537
if(result === false) {

0 commit comments

Comments
 (0)