From 9fd1dda69f0f5edd0db1b13078116c16c77880dc Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Thu, 20 May 2021 09:57:17 +0200 Subject: [PATCH] Partial fix for #1685 - quote shell variables on UNIX platforms This allows having shell metacharacters (like spaces) in path names. This does not yet fix the situation for Windows - there, quotation is context-dependent, so quite a bit harder to fix properly. Signed-off-by: Peter Bex --- NEWS | 2 ++ egg-compile.scm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c5eb0f03..7f9faecd 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,8 @@ `Error: (string->number) bad argument type: #!eof` in some cases. - If chicken-install has a program prefix/suffix, it now writes to a cache directory matching its program name (#1713, thanks to Alice Maz) + - Fixed bug in chicken-install regarding variable quotation on UNIX-like + systems which prevented installation into paths with spaces (#1685). 5.2.0 diff --git a/egg-compile.scm b/egg-compile.scm index a4c4bf0c..186a7227 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -1239,7 +1239,7 @@ EOF (define (shell-variable var platform) (case platform - ((unix) (string-append "${" var "}")) + ((unix) (string-append "\"${" var "}\"")) ((windows) (string-append "%" var "%")))) ;; NOTE `cmd' must already be quoted for shell -- 2.20.1