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';
|
||||
}
|
||||
}
|
||||
|
||||
// set the permissions to be able to execute
|
||||
fs.chmodSync(process.cwd() + bin.slice(1), 0755);
|
||||
var path = process.cwd() + bin.slice(1);
|
||||
if(fs.existsSync(path)){
|
||||
// set the permissions to be able to execute
|
||||
fs.chmodSync(path, 0755);
|
||||
}
|
||||
|
||||
this.fileExists(bin, function(result){
|
||||
if(result === false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue