[Git][ghc/ghc][wip/ghc-9.10] mk/relpath: Fix quoting
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Mar 13 13:07:16 UTC 2024
Ben Gamari pushed to branch wip/ghc-9.10 at Glasgow Haskell Compiler / GHC
Commits:
9f85900d by Ben Gamari at 2024-03-13T08:59:50-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/9f85900d1d851adaa91215b21d362eed95387b5d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9f85900d1d851adaa91215b21d362eed95387b5d
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/2106159d/attachment-0001.html>
More information about the ghc-commits
mailing list