Skip to content
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

Empty entry in PATH env can lead to failure running mvn.cmd, at least on Windows #527

Open
scottkurz opened this issue Oct 4, 2024 · 0 comments

Comments

@scottkurz
Copy link
Member

Saw this running Start on a Liberty app on Windows.

ECHO is on.
Liberty Tools running command: \mvn.cmd io.openliberty.tools:liberty-maven-plugin:dev from directory: C:\git\guides\guide-maven-multimodules\finish

with the Terminal immediately ending up in a <Closed> state, without mvn apparently running.

I think what is happening is that when an "empty" entry ends up on the PATH env var, e.g. set PATH="%PATH%;;C:\mydir" then our test (in io.openliberty.tools.eclipse.CommandBuilder to see if mvn.cmd exists in that dir) succeeds

            File tempFile = new File(member + File.separator + executableBaseName);
            if (tempFile.exists()) {

even though there's no mvn there. I think we might want to special case the empty string and not allow this comparison to succeed.

EXCEPT... it would be nice to understand the Windows file/path syntax enough to know what /mvn.cmd is supposed to represent???

Not finding any hits searching so leaving this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant