Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #116 from vzamanillo/reek-timeout-execution-contro
Browse files Browse the repository at this point in the history
Reek timeout execution control
  • Loading branch information
Arcanemagus authored Feb 7, 2019
2 parents a8bb447 + e2f0bde commit d5aa156
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/linter-reek.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,17 @@ export default {
ignoreExitCode: true,
};

const output = await helpers.exec(this.executablePath, [filePath], execOpts);
let output;
try {
output = await helpers.exec(this.executablePath, [filePath], execOpts);
} catch (e) {
if (e.message !== 'Process execution timed out') throw e;
atom.notifications.addInfo('linter-reek: reek timed out', {
description: 'A timeout occured while executing reek, it could be due to lower resources ' +
'or a temporary overload.',
});
return null;
}

if (TextEditor.getText() !== fileText) {
// Editor contents have changed, tell Linter not to update
Expand Down

0 comments on commit d5aa156

Please sign in to comment.