Update NativeBuildFlags.ps1

This commit is contained in:
patchzyy
2026-08-28 20:45:46 +02:00
parent 2794024d3a
commit eb1721fd72
+3 -1
View File
@@ -42,7 +42,9 @@ function Get-MkwToolchainPath([string]$ToolchainRoot) {
function Get-MkwShellSafeToolchainRoot([string]$ToolchainRoot) {
if ([string]::IsNullOrWhiteSpace($ToolchainRoot)) { throw 'A toolchain root is required.' }
$full = [IO.Path]::GetFullPath($ToolchainRoot).TrimEnd('\')
$full = [IO.Path]::GetFullPath($ToolchainRoot)
# A drive root keeps its separator: "C:" is relative to the current directory on that drive.
if ($full -ne [IO.Path]::GetPathRoot($full)) { $full = $full.TrimEnd('\') }
if ($full -notmatch '[()&^%!]') { return $full }
$sha = [Security.Cryptography.SHA256]::Create()