Skip to content

Commit

Permalink
Merge pull request OpenLiberty#415 from SuparnaSuresh/fixForpoweshell…
Browse files Browse the repository at this point in the history
…mvnExecutable

Fix added for the command in Powershell, Windows OS using maven executable path
  • Loading branch information
TrevCraw authored Dec 2, 2024
2 parents c7b0f3f + 1d7741c commit db4de75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/commandUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export async function getCommandForMaven(pomPath: string, command: string, termi
// attempt to use the Maven executable path, if empty try using mvn or mvnw according to the preferMavenWrapper setting
const mavenExecutablePath: string | undefined = vscode.workspace.getConfiguration("maven").get<string>("executable.path");
if (mavenExecutablePath) {
if (isWin() && terminalType === ShellType.POWERSHELL) {
/**
* Function call to get the command for powershell in Windows OS
*/
return formPowershellCommand(mavenExecutablePath, pomPath, command, "-f ", customCommand);
}
return formDefaultCommandWithPath(mavenExecutablePath, pomPath, command, "-f ", customCommand);
}
let mvnCmdStart = await mvnCmd(pomPath);
Expand Down

0 comments on commit db4de75

Please sign in to comment.