From d8a2857633ed3fc8c7589cf92ba1cf85fbaa4da0 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Mon, 16 Oct 2023 15:34:31 -0600 Subject: classes/image-oci-umoci: Allow environment variables to have spaces Quote the environment variable argument passed to umoci to allow it to correctly handle spaces. Note that this requires that OCI_IMAGE_ENV_VARS have the argument quoted with single quotes, as in: OCI_IMAGE_ENV_VARS = "FOO='bar bat'" Signed-off-by: Joshua Watt Signed-off-by: Bruce Ashfield --- classes/image-oci-umoci.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc index 0d6c712d..70254c41 100644 --- a/classes/image-oci-umoci.inc +++ b/classes/image-oci-umoci.inc @@ -64,8 +64,8 @@ IMAGE_CMD:oci() { fi if [ -n "${OCI_IMAGE_ENV_VARS}" ]; then for l in ${OCI_IMAGE_ENV_VARS}; do - bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env $l" - umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env $l + bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env \"$l\"" + umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env "$l" done fi if [ -n "${OCI_IMAGE_PORTS}" ]; then -- cgit v1.2.3-54-g00ecf