From e6c4e41102f420cb05b32636909ecc9d45a624b7 Mon Sep 17 00:00:00 2001 From: Jelle Licht Date: Mon, 20 Aug 2018 16:51:04 +0200 Subject: [PATCH] utils: Generate valid substitutions in 'wrap-program'. * guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash substitutions when using custom separators. --- guix/build/utils.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index c58a1afd1c..5fe3286843 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -1057,11 +1057,11 @@ with definitions for VARS." (format #f "export ~a=\"~a\"" var (string-join rest sep))) ((var sep 'prefix rest) - (format #f "export ~a=\"~a${~a~a+~a}$~a\"" - var (string-join rest sep) var sep sep var)) + (format #f "export ~a=\"~a${~a:+~a}$~a\"" + var (string-join rest sep) var sep var)) ((var sep 'suffix rest) - (format #f "export ~a=\"$~a${~a~a+~a}~a\"" - var var var sep sep (string-join rest sep))) + (format #f "export ~a=\"$~a${~a+~a}~a\"" + var var var sep (string-join rest sep))) ((var '= rest) (format #f "export ~a=\"~a\"" var (string-join rest ":")))