From 972c9f88601c1640caa8bf5eeb7c24f3e0c882b0 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 12 Mar 2026 08:39:29 +0100 Subject: [PATCH] fix(tools): correct PATH escaping in ROCm profile script The heredoc uses a quoted delimiter (ENVEOF) which disables variable expansion, but the content had backslash-escaped dollar signs. This wrote literal backslashes into /etc/profile.d/rocm.sh, causing PATH corruption. Remove the unnecessary backslashes since the quoted heredoc already prevents expansion during write. Closes #12755 --- misc/tools.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 25ed53f60..6e407ddce 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -4653,8 +4653,8 @@ EOF # Environment (PATH + LD_LIBRARY_PATH) if [[ -d /opt/rocm ]]; then cat <<'ENVEOF' >/etc/profile.d/rocm.sh -export PATH="\$PATH:/opt/rocm/bin" -export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH:+\$LD_LIBRARY_PATH:}/opt/rocm/lib" +export PATH="$PATH:/opt/rocm/bin" +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/opt/rocm/lib" ENVEOF chmod +x /etc/profile.d/rocm.sh # Also make available for current session / systemd services