Skip to content

Commit

Permalink
Ensure we're dealing with the same process.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmecham committed Oct 29, 2019
1 parent c8cece8 commit c2d2ada
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Scripts/rubocop.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class RuboCopProcess {
}

get process() {
if (this._process) { return this._process }

const process = new Process("/usr/bin/env", {
args: ["rubocop", "--format=json", "--stdin", this.path],
cwd: nova.workspace.path,
Expand All @@ -36,7 +38,7 @@ class RuboCopProcess {
process.onStdout(this.handleOutput.bind(this));
process.onStderr(this.handleError.bind(this));

return process;
return (this._process = process);
}

handleError(error) {
Expand Down

0 comments on commit c2d2ada

Please sign in to comment.