Skip to content

Commit 8f7ba33

Browse files
dhasani23David Hasani
andauthored
fix(amazonq): add quotes around jar path (#8158)
## Problem Absolute paths sometimes contain spaces, preventing Maven from running. ## Solution Handle spaces by surrounding the full path with double quotes. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: David Hasani <[email protected]>
1 parent 1562c38 commit 8f7ba33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformMavenHandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import globals from '../../../shared/extensionGlobals'
1717
function collectDependenciesAndMetadata(dependenciesFolderPath: string, workingDirPath: string) {
1818
getLogger().info('CodeTransformation: running mvn clean test-compile with maven JAR')
1919

20-
const baseCommand = transformByQState.getMavenName()
20+
const baseCommand = transformByQState.getMavenName() // always 'mvn'
2121
const jarPath = globals.context.asAbsolutePath(path.join('resources', 'amazonQCT', 'QCT-Maven-1-0-156-0.jar'))
2222

2323
getLogger().info('CodeTransformation: running Maven extension with JAR')
2424

2525
const args = [
26-
`-Dmaven.ext.class.path=${jarPath}`,
27-
`-Dcom.amazon.aws.developer.transform.jobDirectory=${dependenciesFolderPath}`,
26+
`-Dmaven.ext.class.path="${jarPath}"`,
27+
`-Dcom.amazon.aws.developer.transform.jobDirectory="${dependenciesFolderPath}"`,
2828
'clean',
2929
'test-compile',
3030
]

0 commit comments

Comments
 (0)