Issue: If NStrip wasn't found in folder or PATH, it tries to show a message to user, but it doesn't wait for key input, so it just immediately closes.

This commit is contained in:
SurprisinglySuspicious 2024-11-20 16:07:52 -05:00
parent d0c8298074
commit 04c4a4590d

View file

@ -139,7 +139,7 @@ if ($missingMods.Count -gt 0) {
Write-Host ""
Write-Host "Copied all libraries!"
Write-Host ""
Write-Host "Press any key to strip the Dlls using NStrip"
Write-Host "Press any key to strip the DLLs using NStrip..."
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()
@ -156,6 +156,10 @@ else {
# Display an error message if NStrip.exe could not be found
Write-Host "Could not find NStrip.exe in the current directory nor in the PATH." -ForegroundColor Red
Write-Host "Visit https://github.com/bbepis/NStrip/releases/latest to grab a copy." -ForegroundColor Red
Write-Host ""
Write-Host "Press any key to exit..."
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()
return
}
}
@ -169,6 +173,6 @@ foreach($dllFile in $dllsToStrip) {
Write-Host ""
Write-Host "Copied all libraries and stripped the DLLs!"
Write-Host ""
Write-Host "Press any key to exit"
Write-Host "Press any key to exit..."
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()