[Git][ghc/ghc][wip/T24538] mk/relpath: Fix quoting
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Mar 13 13:16:57 UTC 2024
Ben Gamari pushed to branch wip/T24538 at Glasgow Haskell Compiler / GHC
Commits:
5cd42fc8 by Ben Gamari at 2024-03-13T09:16:52-04:00
mk/relpath: Fix quoting
Previously there were two instances in this script which lacked proper
quoting. This resulted in `relpath` invocations in the binary
distribution Makefile producing incorrect results on Windows, leading to
confusing failures from `sed` and the production of empty package
registrations.
Fixes #24538.
- - - - -
1 changed file:
- mk/relpath.sh
Changes:
=====================================
mk/relpath.sh
=====================================
@@ -15,7 +15,7 @@ target="$2"
common_part="$src"
result=""
-while test "${target#$common_part}" = "${target}" ; do
+while test "${target#"$common_part"}" = "${target}" ; do
#echo "common_part is now : \"$common_part\""
#echo "result is now : \"$result\""
#echo "target#common_part : \"${target#$common_part}\""
@@ -39,7 +39,7 @@ fi
# since we now have identified the common part,
# compute the non-common part
-forward_part="${target#$common_part}"
+forward_part="${target#"$common_part"}"
#echo "forward_part = \"$forward_part\""
if test -n "$result" && test -n "$forward_part" ; then
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5cd42fc830146f02309d61031180dc551e6c721b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5cd42fc830146f02309d61031180dc551e6c721b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240313/0c93f8dd/attachment-0001.html>
More information about the ghc-commits
mailing list