~ chicken-core (chicken-5) 278c24772d859eed9ecbd47a69a9127d0a18938f
commit 278c24772d859eed9ecbd47a69a9127d0a18938f
Author: Vasilij Schneidermann <mail@vasilij.de>
AuthorDate: Sun Apr 11 20:01:23 2021 +0200
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Fri Jul 30 12:53:50 2021 +1200
Correctly quote set calls in Windows scripts
According to https://ss64.com/nt/set.html, the set command should quote
its entire argument, including the name. Likewise, quotes inside paths
are illegal, therefore no quotes should be used inside PATH.
It appears that the Windows shell cannot deal with quoting inside an
argument, only when quotes surround the argument. This is not the case
on Unix environments at all.
Closes #1727
Signed-off-by: Peter Bex <peter@more-magic.net>
Signed-off-by: Evan Hanson <evhan@foldling.org>
diff --git a/NEWS b/NEWS
index 060a9d0e..a6d8c845 100644
--- a/NEWS
+++ b/NEWS
@@ -80,6 +80,9 @@
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).
+ - Fixed a similar bug in chicken-install for paths with spaces on mingw
+ and mingw-msys (#1727, thanks to Josh Helzer for reporting and Vasilij
+ Schneidermann for the patch).
- Module system
- Fixed a memory leak when calling (import) multiple times in a row
diff --git a/egg-compile.scm b/egg-compile.scm
index 186a7227..205505a6 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -1128,16 +1128,16 @@ EOF
((windows)
(printf #<<EOF
@echo off~%
-set PATH=~a;%PATH%
-set CHICKEN_CC=~a
-set CHICKEN_CXX=~a
-set CHICKEN_CSC=~a
-set CHICKEN_CSI=~a
+set "PATH=~a;%PATH%"
+set "CHICKEN_CC=~a"
+set "CHICKEN_CXX=~a"
+set "CHICKEN_CSC=~a"
+set "CHICKEN_CSI=~a"
EOF
- (qs* default-bindir platform) (qs* default-cc platform)
- (qs* default-cxx platform) (qs* default-csc platform)
- (qs* default-csi platform)))))
+ default-bindir default-cc
+ default-cxx default-csc
+ default-csi))))
(define ((build-suffix mode name info) platform)
(case platform
Trap