-
Notifications
You must be signed in to change notification settings - Fork 4.5k
cli: an equals sign in a context value is dropped #5738
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
If the value for a context contains an equals sign, the cli drops the equals sign.
cdk synth -c foo=bar=Produces a value of "bar" for the context named "foo" instead of the expected value "bar=".
Reproduction Steps
- Synth the following stack with this context value
-c foo=bar=:
export class FooStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const foo: string = this.node.tryGetContext('foo');
new cdk.CfnOutput(this, 'foo', { value: foo });
}
}cdk synth -c foo=bar=Expected Output
Outputs:
foo:
Value: bar=Actual Output
Outputs:
foo:
Value: barEnvironment
- CLI Version :1.19.0
- Framework Version:1.19.0
- OS :Linux
- Language :TypeScript
Other
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI