-
Notifications
You must be signed in to change notification settings - Fork 34
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
mvnCmd and gradleCmd should quote executable paths #337
Comments
@SuparnaSuresh One thing to consider is that the format of the command should not be determined by the OS, but by the type of terminal that the user is starting Liberty in. For instance, in my VS Code environment on Windows, here are the options I have for types of terminals: |
@TrevCraw After considering above comment. Did analysis on the os+terminal combinations and tried executing the scenarios by configuring different terminals. Mac
Windows Also in the case of windows, format of the command is different in each terminal.
Maven gradle
gradle
Maven Gradle
Able to identify the terminal using vscode.env.shell; And considered below shell types. [Referred vscode for maven code] |
Checks added before creating commands,
Sample command format for each OS and Terminal combination.
|
When I try to start a server from the Liberty Dashboard, there is a shell quoting problem running the maven within the extension:
AFAIK there is nothing special about my vscode and my project is based on a recent guide.
IIUC devCommands.ts should either return a quoted path (when not returning the "mvn" or "gradle" verbatim) or the callers of mvnCmd/gradleCmd need to wrap the returned value similar to how the maven plugin does with the references you can find to this utility function: https://github.com/microsoft/vscode-maven/blob/2ab8f392f418c8e0fe2903387f2b0013a1c50e78/src/utils/mavenUtils.ts#L170
https://github.com/OpenLiberty/liberty-tools-vscode/blob/main/src/liberty/devCommands.ts#L112
liberty-tools-vscode/src/liberty/devCommands.ts
Line 537 in 29ecc9a
The text was updated successfully, but these errors were encountered: