Skip to content

Commit 9bbdecd

Browse files
committed
log error message when verilaor cannot be executed
1 parent 7609bb1 commit 9bbdecd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/linter/VerilatorLinter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ export default class VerilatorLinter extends BaseLinter {
109109
(_error: Error, _stdout: string, stderr: string) => {
110110
let diagnostics: vscode.Diagnostic[] = [];
111111
stderr.split(/\r?\n/g).forEach((line, _) => {
112+
if (line.search("No such file or directory") >= 0 || line.search("Not a directory") >= 0 || line.search("command not found") >= 0) {
113+
this.logger.error(`Could not execute command: ${command}`);
114+
return;
115+
}
116+
112117
if (!line.startsWith('%') || line.indexOf(docUri) <= 0) {
113118
return;
114119
}

0 commit comments

Comments
 (0)