Skip to content

Commit

Permalink
Evaluate should work even when input missing
Browse files Browse the repository at this point in the history
Fixes #1294

Signed-off-by: Anders Eknert <[email protected]>
  • Loading branch information
anderseknert committed Dec 12, 2024
1 parent 8a096a1 commit 8e52767
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/lsp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,9 @@ func (l *LanguageServer) StartCommandWorker(ctx context.Context) { //nolint:main
}
} else {
// Normal mode — try to find the input.json/yaml file in the workspace and use as input
// NOTE that we don't break on missing input, as some rules don't depend on that, and should
// still be evaluable. We may consider returning some notice to the user though.
_, inputMap = rio.FindInput(uri.ToPath(l.clientIdentifier, file), l.workspacePath())

if inputMap == nil {
break
}
}

var result EvalPathResult
Expand Down

0 comments on commit 8e52767

Please sign in to comment.