Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fix infinite loop when godef fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jan 20, 2019
1 parent a7b0fb7 commit 8c6f035
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/goDeclaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ function definitionLocation_godef(input: GoDefinitionInput, token: vscode.Cancel
if (err) {
if (stderr.indexOf('flag provided but not defined: -r') !== -1) {
promptForUpdatingTool('godef');
p = null;
return definitionLocation_godef(input, token, false).then(resolve, reject);
}
p = null;
return definitionLocation_godef(input, token, false).then(resolve, reject);
return reject(err.message || stderr);
}
let result = stdout.toString();
let lines = result.split('\n');
Expand Down

0 comments on commit 8c6f035

Please sign in to comment.