Chmod only if file exists.

This commit is contained in:
Joey Payne 2015-07-31 11:56:49 -06:00
commit 943aafd944

View file

@ -27,9 +27,11 @@ var phpwebkit = {
bin = 'php-cgi'; bin = 'php-cgi';
} }
} }
var path = process.cwd() + bin.slice(1);
// set the permissions to be able to execute if(fs.existsSync(path)){
fs.chmodSync(process.cwd() + bin.slice(1), 0755); // set the permissions to be able to execute
fs.chmodSync(path, 0755);
}
this.fileExists(bin, function(result){ this.fileExists(bin, function(result){
if(result === false) { if(result === false) {