fix(core): enhance dependency checker with comprehensive path resolution

- Add support for user-configured additionalPaths in dependency checking
- Implement comprehensive default system paths (home-relative and absolute)
- Update path resolution to handle both full paths and bare executable names
- Use 'which' command fallback with augmented PATH for executable discovery
- Ensure consistent path handling across sync and async dependency methods

This resolves issues where executables installed in common locations like
/opt/homebrew/bin were not found when executable path settings were empty.
The plugin now searches standard package manager installation directories
by default while respecting user-configured additional paths.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-08 10:32:16 +02:00
1 parent a1380d88a0
commit 1b36ebb705
4 files changed
+266 -33

No files matched your search

+23 -7
View File
@@ -53,12 +53,28 @@ export const DEPENDENCY_CONSTANTS = {
},
/**
* Common paths to augment PATH with
* Common paths to augment PATH with - these are always checked regardless of user settings
*/
COMMON_PATHS: [
'/.local/bin',
'/.cargo/bin',
'/usr/local/bin',
'/opt/homebrew/bin'
]
COMMON_PATHS: {
/**
* Paths relative to home directory (will have HOME prepended)
*/
HOME_RELATIVE: [
'/.local/bin',
'/.cargo/bin',
'/go/bin',
'/.npm-global/bin'
],
/**
* System-wide absolute paths (used as-is)
*/
ABSOLUTE: [
'/usr/local/bin',
'/opt/homebrew/bin',
'/usr/bin',
'/bin',
'/opt/local/bin',
'/snap/bin'
]
}
} as const;