From ee3d9b30affbae34300a934edff3ac27ccfb6781 Mon Sep 17 00:00:00 2001 From: Sina Sharifzade Date: Thu, 9 Jun 2016 19:27:43 +0430 Subject: [PATCH] Checks file path exists or not --- src/beautifiers/php-cs-fixer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/beautifiers/php-cs-fixer.coffee b/src/beautifiers/php-cs-fixer.coffee index 350bc3a..a7d75ee 100644 --- a/src/beautifiers/php-cs-fixer.coffee +++ b/src/beautifiers/php-cs-fixer.coffee @@ -17,7 +17,7 @@ module.exports = class PHPCSFixer extends Beautifier beautify: (text, language, options, context) -> @debug('php-cs-fixer', options) - configFile = @findFile(path.dirname(context.filePath), '.php_cs') + configFile = if context.filePath then @findFile(path.dirname(context.filePath), '.php_cs') if @isWindows # Find php-cs-fixer.phar script