run "phpcbf.bat" instead of "php phpcbf.bat"
If phpcbfPath is an executable then run it instead of running it as an argument to php
This commit is contained in:
parent
c8a654a3ea
commit
1c4d48893f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue