Handles rubocop internal error

This commit is contained in:
Brian Bugh 2017-08-02 14:12:08 -05:00
parent ea0e0677e5
commit a719fa2241
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ module.exports = class Rubocop extends Beautifier
onStdin: (stdin) -> stdin.end text
}).then((stdout) =>
@debug("rubocop output", stdout)
# Rubocop output an error if stdout is empty
return text if stdout.length == 0
result = stdout.split("====================\n")
result[result.length - 1]
)