mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use Regex instead of parsing JsonObject
This commit is contained in:
parent
b729cb1c7d
commit
cc9c51d899
1 changed files with 3 additions and 5 deletions
|
|
@ -50,10 +50,8 @@ function Delete-Unused ($path, $config) {
|
|||
function Remove-CreateDumpExe ($path, $config) {
|
||||
$target = "$path\Output\$config"
|
||||
|
||||
$depjson = Get-Content $target\Flow.Launcher.deps.json -raw |ConvertFrom-Json -depth 32
|
||||
$depjson.targets.'.NETCoreApp,Version=v5.0/win-x64'.'runtimepack.Microsoft.NETCore.App.Runtime.win-x64/5.0.6'.native.PSObject.Properties.Remove("createdump.exe")
|
||||
$depjson|ConvertTo-Json -Depth 32|Out-File $target\Flow.Launcher.deps.json
|
||||
Remove-Item -Path $target -Include "*createdump.exe" -Recurse
|
||||
$depjson = Get-Content $target\Flow.Launcher.deps.json -raw
|
||||
$depjson -replace '(?s)(.createdump.exe": {.*?}.*?\n)\s*', "" | Out-File $target\Flow.Launcher.deps.json
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -127,4 +125,4 @@ function Main {
|
|||
}
|
||||
}
|
||||
|
||||
Main
|
||||
Main
|
||||
|
|
|
|||
Loading…
Reference in a new issue