From: Matthew Fernandez Date: Sun, 20 Feb 2022 23:03:55 +0000 (-0800) Subject: Windows: remove usage of 'sed' in setup-build-utilities script X-Git-Tag: 3.0.0~10^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7d61b03f1fe24c437852531460dea755178d7a8;p=graphviz Windows: remove usage of 'sed' in setup-build-utilities script This results in `$PATH` potentially having duplicated trailing entries, but this causes no harm and preventing it does not seem worth a `sed` dependency. Gitlab: #2115 --- diff --git a/windows/bin/setup-build-utilities.ps1 b/windows/bin/setup-build-utilities.ps1 index 8a83533c8..11fb02bbb 100644 --- a/windows/bin/setup-build-utilities.ps1 +++ b/windows/bin/setup-build-utilities.ps1 @@ -57,8 +57,6 @@ find_or_fallback "msbuild" "$MSBUILD_BIN" if (-NOT (cpack.exe --help | Select-String 'CPACK_GENERATOR')) { echo "Moving $CMAKE_BIN to front of PATH in order to find CMake's cpack" - $CMAKE_BIN_ESCAPED = echo $CMAKE_BIN | sed 's#\\#\\\\#g' - $path = (Invoke-Expression 'echo $Env:Path' | sed "s#;$CMAKE_BIN_ESCAPED##") $Env:Path="$CMAKE_BIN;$path" } @@ -66,8 +64,7 @@ $ErrorActionPreference = "Continue" if (-NOT (sort.exe /? 2>$null | Select-String "SORT")) { $ErrorActionPreference = "Stop" echo "Moving C:\WINDOWS\system32 to front of PATH in order to find Windows' sort" - $path = (Invoke-Expression 'echo $Env:Path' | sed 's#;C:\\WINDOWS\\system32;#;#') - $Env:Path="C:\WINDOWS\system32;$path" + $Env:Path="C:\WINDOWS\system32;$Env:Path" } $ErrorActionPreference = "Stop"