Skip to content

Commit

Permalink
log error message when verilaor cannot be executed
Browse files Browse the repository at this point in the history
  • Loading branch information
mshr-h committed Jul 24, 2024
1 parent 7609bb1 commit 9bbdecd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/linter/VerilatorLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ export default class VerilatorLinter extends BaseLinter {
(_error: Error, _stdout: string, stderr: string) => {
let diagnostics: vscode.Diagnostic[] = [];
stderr.split(/\r?\n/g).forEach((line, _) => {
if (line.search("No such file or directory") >= 0 || line.search("Not a directory") >= 0 || line.search("command not found") >= 0) {
this.logger.error(`Could not execute command: ${command}`);
return;
}

if (!line.startsWith('%') || line.indexOf(docUri) <= 0) {
return;
}
Expand Down

0 comments on commit 9bbdecd

Please sign in to comment.