jlicht pushed a commit to branch core-updates in repository guix. commit e6c4e41102f420cb05b32636909ecc9d45a624b7 Author: Jelle Licht <jli...@fsfe.org> Date: Mon Aug 20 16:51:04 2018 +0200
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 c58a1af..5fe3286 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 ":")))