diff --git a/src/pkg/utils/yaml.go b/src/pkg/utils/yaml.go index 653ce55e07..f3fdaa53b7 100644 --- a/src/pkg/utils/yaml.go +++ b/src/pkg/utils/yaml.go @@ -91,10 +91,7 @@ func ColorPrintYAML(data any, hints map[string]string, spaceRootLists bool) { // Inject the hints into the colorized YAML for key, value := range hints { - // add hints to root keys - pattern := fmt.Sprintf(`(?m)^\x1b\[(.*?)m\x1b\[(.*?)m%s`, regexp.QuoteMeta(key)) - re := regexp.MustCompile(pattern) - outputYAML = re.ReplaceAllString(outputYAML, value) + outputYAML = strings.Replace(outputYAML, key, value, 1) } if !message.ColorEnabled() { diff --git a/src/test/e2e/09_component_compose_test.go b/src/test/e2e/09_component_compose_test.go index 845f1f4c8d..8c369feab9 100644 --- a/src/test/e2e/09_component_compose_test.go +++ b/src/test/e2e/09_component_compose_test.go @@ -105,10 +105,6 @@ func (suite *CompositionSuite) Test_1_FullComposability() { valuesFiles: - files/test-values.yaml - files/test-values.yaml - variables: - - name: MY_COLOR - description: The color of the podinfo pod - path: color - name: podinfo-compose-two version: 6.4.0 url: oci://ghcr.io/stefanprodan/charts/podinfo diff --git a/src/test/packages/09-composable-packages/files/test-values.yaml b/src/test/packages/09-composable-packages/files/test-values.yaml index eeec8bbe8c..b574e0dec9 100644 --- a/src/test/packages/09-composable-packages/files/test-values.yaml +++ b/src/test/packages/09-composable-packages/files/test-values.yaml @@ -8,5 +8,3 @@ resources: memory: 16Mi # Add some ephemeral storage for data injections ephemeral-storage: 16Mi - -color: pink \ No newline at end of file diff --git a/src/test/packages/09-composable-packages/zarf.yaml b/src/test/packages/09-composable-packages/zarf.yaml index 29c5cbbe21..6ec2dd49b8 100644 --- a/src/test/packages/09-composable-packages/zarf.yaml +++ b/src/test/packages/09-composable-packages/zarf.yaml @@ -17,10 +17,6 @@ components: namespace: podinfo-override valuesFiles: - files/test-values.yaml - variables: - - name: MY_COLOR - description: The color of the podinfo pod - path: color - name: podinfo-compose-two releaseName: podinfo-compose-two version: 6.4.0