Chmod only if file exists.
This commit is contained in:
parent
0e481f5fbb
commit
943aafd944
1 changed files with 5 additions and 3 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue