Merge pull request #1023 from UziTech/UziTech-phpcbf-bat-fix

run "phpcbf.bat" instead of "php phpcbf.bat"
This commit is contained in:
Glavin Wiechert 2016-06-23 19:26:14 -03:00 committed by GitHub
commit 7c7ab64fba
1 changed files with 7 additions and 2 deletions

View File

@ -37,8 +37,13 @@ module.exports = class PHPCBF extends Beautifier
# Check if phpcbf path was found
if phpcbfPath?
# Found phpcbf path
@run("php", [
phpcbfPath
# Check if phpcbf is an executable
isExec = path.extname(phpcbfPath) isnt ''
exec = if isExec then phpcbfPath else "php"
@run(exec, [
phpcbfPath unless isExec
"--no-patch"
"--standard=#{options.standard}" if options.standard
tempFile = @tempFile("temp", text)