Skip to content

Ignore blank and null entries in PATH search for mvn/gradle execs #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

scottkurz
Copy link
Collaborator

@scottkurz scottkurz commented Feb 25, 2025

Motivation and Context

With a null PATH entry on Windows finding the mvn command resolves to absolute path: "C:\mvn.cmd" which does not exist for me, so the dependency lib download fails.

Error log msgs like:

�[36m2025-02-25T10:27:24.866896�[0m�[31m	[ERROR]	�[0mCould not verify that C:\mvn.cmd exists
�[36m2025-02-25T10:27:24.932447400�[0m�[33m	[WARN]	�[0mFailed to download library dependencies of project

I noticed this on v1.1.0 but looking at the code it appears to exist in the main branch as well.

How Has This Been Tested?

Tested with an empty PATH entry on Windows

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

Haven't tested

Additional context

I did a bit of searching to try to understand if an empty PATH entry should be considered meaningful, and found some leads suggesting it should mean the current directory. I didn't follow up on this though.

We wouldn't want to use map(File::getAbsolutePath) if we wanted to find something in the current directory, so that would require a different solution. It might still be better to filter this case out until/unless it is clear we want to include it.

@rahlk rahlk merged commit 4a288fa into codellm-devkit:main Apr 16, 2025
@rahlk rahlk added the bug Something isn't working label Apr 16, 2025
@rahlk rahlk self-assigned this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants