From 98ee9f09799b37ea7844dfd7b76c6d835670cb68 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Mon, 26 Jun 2023 14:06:46 -0700 Subject: [PATCH] escape semicolons in variable values in integration-test-env-goland.sh Co-authored-by: Benjamin A. Petersen --- hack/integration-test-env-goland.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hack/integration-test-env-goland.sh b/hack/integration-test-env-goland.sh index db2c0bc45..c4991627d 100755 --- a/hack/integration-test-env-goland.sh +++ b/hack/integration-test-env-goland.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. +# Copyright 2020-2023 the Pinniped contributors. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # @@ -17,7 +17,9 @@ echo -n "PINNIPED_TEST_GOLAND_RUNNER=true;" printenv | grep PINNIPED_TEST_ | sed 's/=.*//g' | grep -v CLUSTER_CAPABILITY_YAML | while read -r var ; do echo -n "${var}=" - echo -n "${!var}" | tr -d '\n' + # Goland will treat semicolons as key/value pair separators. + # Within a value, a semicolon needs to be escaped with a backslash for Goland. + echo -n "${!var}" | sed 's/;/\\;/g' | tr -d '\n' echo -n ";" done