From 55e1a8d3408ab5e83275530f4b17f178fa881f32 Mon Sep 17 00:00:00 2001 From: SuparnaSuresh Date: Thu, 28 Nov 2024 15:43:42 +0530 Subject: [PATCH] fix for gradle warpper command --- src/util/commandUtils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/commandUtils.ts b/src/util/commandUtils.ts index 8f859664..1450b1d5 100644 --- a/src/util/commandUtils.ts +++ b/src/util/commandUtils.ts @@ -60,7 +60,7 @@ export async function getCommandForGradle(buildGradlePath: string, command: stri return getGradleCommandForWin(gradleCmdStart, buildGradlePath, command, terminalType, customCommand); } else { gradleCmdStart = Path.join(gradleCmdStart, "gradlew"); - return formDefaultCommand(gradleCmdStart, buildGradlePath, command, "-b=", customCommand); + return formDefaultCommandWithPath(gradleCmdStart, buildGradlePath, command, "-b=", customCommand); } } @@ -215,17 +215,17 @@ function formLinuxBasedCommand(cmdStart: string, command: string, wrapperType: S } /** - * Returns default command + * Returns default command if 'mvn'/ 'gradle' using for command execution */ -function formDefaultCommand(projectPath: string, buildFilePath: String, command: string, cmdOption: String, customCommand?: string): string { +function formDefaultCommand(cmdExecutable: string, buildFilePath: String, command: string, cmdOption: String, customCommand?: string): string { if (customCommand) { - return `${projectPath} ` + `${command}` + ` ${customCommand}` + ` ${cmdOption}"${buildFilePath}"`; + return `${cmdExecutable} ` + `${command}` + ` ${customCommand}` + ` ${cmdOption}"${buildFilePath}"`; } - return `${projectPath} ` + `${command}` + ` ${cmdOption}"${buildFilePath}"`; + return `${cmdExecutable} ` + `${command}` + ` ${cmdOption}"${buildFilePath}"`; } /** - * Returns default format for the command with Path + * Returns default format for the command with wrapper path specified */ function formDefaultCommandWithPath(projectPath: string, buildFilePath: String, command: string, cmdOption: String, customCommand?: string): string { if (customCommand) {