Skip to content

Commit

Permalink
Fix added for powershell command using maven executable path
Browse files Browse the repository at this point in the history
  • Loading branch information
SuparnaSuresh committed Dec 2, 2024
1 parent c7b0f3f commit 1d7741c
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 1d7741c

Please sign in to comment.