From 1ad80d74e2513f7872bc9af38e9f0b588397a85c Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann <mail@vasilij.de>
Date: Sun, 11 Apr 2021 20:01:23 +0200
Subject: [PATCH] Correctly quote set calls in Windows scripts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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
---
egg-compile.scm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/egg-compile.scm b/egg-compile.scm
index be05f6a6..583f5b41 100644
a
|
b
|
EOF |
1123 | 1123 | ((windows) |
1124 | 1124 | (printf #<<EOF |
1125 | 1125 | @echo off~% |
1126 | | set PATH=~a;%PATH% |
1127 | | set CHICKEN_CC=~a |
1128 | | set CHICKEN_CXX=~a |
1129 | | set CHICKEN_CSC=~a |
1130 | | set CHICKEN_CSI=~a |
| 1126 | set "PATH=~a;%PATH%" |
| 1127 | set "CHICKEN_CC=~a" |
| 1128 | set "CHICKEN_CXX=~a" |
| 1129 | set "CHICKEN_CSC=~a" |
| 1130 | set "CHICKEN_CSI=~a" |
1131 | 1131 | |
1132 | 1132 | EOF |
1133 | | (qs* default-bindir platform) (qs* default-cc platform) |
1134 | | (qs* default-cxx platform) (qs* default-csc platform) |
1135 | | (qs* default-csi platform))))) |
| 1133 | default-bindir default-cc |
| 1134 | default-cxx default-csc |
| 1135 | default-csi)))) |
1136 | 1136 | |
1137 | 1137 | (define ((build-suffix mode name info) platform) |
1138 | 1138 | (case platform |