Add ToolNotFoundError for clear diagnostics when CLI tools are missing#5968
Merged
vrubezhny merged 1 commit intoJul 18, 2026
Merged
Conversation
When a bundled CLI tool (e.g. oc) is not found or version-mismatched, executeSyncTool would pass undefined to execFileSync, causing a silent failure caught by requireLogin()'s .catch(() => true). The Explorer would show "Cluster is not accessible" with no indication that the real issue was a missing tool binary. - Add ToolNotFoundError class in src/tools.ts with toolName property - Guard executeSyncTool in cli.ts to throw ToolNotFoundError when ToolsConfig.detect() returns undefined - Re-throw ToolNotFoundError in loginUtil.ts catch blocks so it propagates to callers instead of being silently swallowed - Add unit tests for ToolNotFoundError class (tools.test.ts) - Add unit tests for requireLogin() error propagation (loginUtil.test.ts) Signed-off-by: Victor Rubezhny <[email protected]> Assisted-By: Claude Opus 4.6 <[email protected]>
vrubezhny
force-pushed
the
fix/tool-not-found-error
branch
from
July 18, 2026 00:05
fab1dc1 to
aebdbec
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5968 +/- ##
===========================================
+ Coverage 32.37% 50.57% +18.20%
===========================================
Files 85 114 +29
Lines 6505 10388 +3883
Branches 1349 2334 +985
===========================================
+ Hits 2106 5254 +3148
- Misses 4399 5131 +732
- Partials 0 3 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a bundled CLI tool (e.g. oc) is not found or version-mismatched, executeSyncTool would pass undefined to execFileSync, causing a silent failure caught by requireLogin()'s .catch(() => true). The Explorer would show "Cluster is not accessible" with no indication that the real issue was a missing tool binary.
Assisted-By: Claude Opus 4.6 [email protected]