aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle Licht <jlicht@fsfe.org>2018-08-20 16:51:04 +0200
committerJelle Licht <jlicht@fsfe.org>2018-08-20 17:00:45 +0200
commite6c4e41102f420cb05b32636909ecc9d45a624b7 (patch)
treef034b58adb4c2d4bd4bfebcc7eaf62558b700a7d
parent4866cba66ae40d722bb6c50b7dca27725ffa4532 (diff)
downloadpatches-e6c4e41102f420cb05b32636909ecc9d45a624b7.tar
patches-e6c4e41102f420cb05b32636909ecc9d45a624b7.tar.gz
utils: Generate valid substitutions in 'wrap-program'.
* guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash substitutions when using custom separators.
-rw-r--r--guix/build/utils.scm8
1 files 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 ":")))