sync: WIN10-I9-64G 2026-10-01
This commit is contained in:
@@ -32,7 +32,7 @@ $envText = Get-Content $EnvFile -Raw
|
|||||||
function Get-EnvKey([string]$Key) {
|
function Get-EnvKey([string]$Key) {
|
||||||
$m = [regex]::Match($envText, "(?m)^\s*$([regex]::Escape($Key))\s*=\s*(.+?)\s*$")
|
$m = [regex]::Match($envText, "(?m)^\s*$([regex]::Escape($Key))\s*=\s*(.+?)\s*$")
|
||||||
if (-not $m.Success) { return "" }
|
if (-not $m.Success) { return "" }
|
||||||
$v = $m.Groups[1].Value.Trim()
|
$v = ($m.Groups[1].Value -replace '\s+#.*$', '').Trim() # drop inline comment
|
||||||
if ($v -match "^<.*>$") { return "" } # unfilled placeholder
|
if ($v -match "^<.*>$") { return "" } # unfilled placeholder
|
||||||
return $v
|
return $v
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user