Describe the bug
When building NodejsFunctions using esbuild, it incorrectly maps the arguments to esbuild if there are paths in props.bundling.inject that has whitespace.
new NodejsFunction(scope, `some-id`, {
bundling: {
inject: ['/path with spaces/test.js']
}
})
|
...this.props.inject ? this.props.inject.map(i => `--inject:${i}`) : [], |
Expected Behavior
should be wrapped in quotes so it is not treated as multiple inputs.
-inject:"/path with spaces/test.js"
Current Behavior
there are unescaped whitespaces treating it as multiple inputs
-inject:/path with spaces/test.js
Reproduction Steps
attempt to build NodejsFunction with paths with spaces
new NodejsFunction(scope, `some-id`, {
bundling: {
inject: ['/path with spaces/test.js']
}
})
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
n/a
Framework Version
No response
Node.js Version
v18.19.1
OS
mac os
Language
TypeScript
Language Version
No response
Other information
No response
Describe the bug
When building NodejsFunctions using esbuild, it incorrectly maps the arguments to esbuild if there are paths in
props.bundling.injectthat has whitespace.aws-cdk/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts
Line 245 in 0fee99b
Expected Behavior
should be wrapped in quotes so it is not treated as multiple inputs.
-inject:"/path with spaces/test.js"Current Behavior
there are unescaped whitespaces treating it as multiple inputs
-inject:/path with spaces/test.jsReproduction Steps
attempt to build NodejsFunction with paths with spaces
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
n/a
Framework Version
No response
Node.js Version
v18.19.1
OS
mac os
Language
TypeScript
Language Version
No response
Other information
No response