From 5b2e0a1ab32fdb5c315e0ce0f5640105cd08b202 Mon Sep 17 00:00:00 2001 From: Arman Yessenamanov Date: Mon, 11 Jul 2016 19:36:52 +0600 Subject: [PATCH] Fix phpcbf hanging issue by closing stdin --- CHANGELOG.md | 1 + package.json | 4 ++++ src/beautifiers/phpcbf.coffee | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d98b1..e55516b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add [yapf](http://github.com/google/yapf) beautifier for Python. - Closes [#776] (https://github.com/Glavin001/atom-beautify/issues/776) Add support for `collapse-preserve-inline` brace_style for javascript. - Closes [#786](https://github.com/Glavin001/atom-beautify/issues/786) YAPF configuration files are ignored. +- Fix phpcbf hanging issue by closing stdin. See [#893](https://github.com/Glavin001/atom-beautify/issues/893) # v0.29.0 - Closes [#447](https://github.com/Glavin001/atom-beautify/issues/447). Improved Handlebars language support diff --git a/package.json b/package.json index 033feb5..0a219bd 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,10 @@ { "name": "Joost van Doorn", "url": "https://github.com/JoostvDoorn" + }, + { + "name": "Arman Yessenamanov", + "url": "https://github.com/yesenarman" } ], "engines": { diff --git a/src/beautifiers/phpcbf.coffee b/src/beautifiers/phpcbf.coffee index 1848d89..67ebd2f 100644 --- a/src/beautifiers/phpcbf.coffee +++ b/src/beautifiers/phpcbf.coffee @@ -53,6 +53,8 @@ module.exports = class PHPCBF extends Beautifier help: { link: "http://php.net/manual/en/install.php" } + onStdin: (stdin) -> + stdin.end() }) .then(=> @readFile(tempFile) @@ -79,6 +81,8 @@ module.exports = class PHPCBF extends Beautifier help: { link: "https://github.com/squizlabs/PHP_CodeSniffer" } + onStdin: (stdin) -> + stdin.end() }) .then(=> @readFile(tempFile)