[skip ci] Add prompt for updating Spotify before patching (optional) (#264)

This commit is contained in:
Infiniteez 2021-11-19 21:06:50 +01:00 committed by GitHub
parent ae5eb315a3
commit aed3f921f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,9 +105,23 @@ Expand-Archive -Force -LiteralPath "$PWD\xpui.zip" -DestinationPath $PWD
Remove-Item -LiteralPath "$PWD\xpui.zip"
#>
$spotifyInstalled = (Test-Path -LiteralPath $SpotifyExecutable)
if (-not $spotifyInstalled) {
$update = $false
if ($spotifyInstalled) {
$ch = Read-Host -Prompt "Optional - Update Spotify to the latest version. (Might already be updated). (Y/N) "
if ($ch -eq 'y') {
$update = $true
} else {
Write-Host @'
Won't try to update Spotify.
'@
}
} else {
Write-Host @'
Spotify installation was not detected.
'@
}
if (-not $spotifyInstalled -or $update) {
Write-Host @'
Downloading Latest Spotify full setup, please wait...
'@
try {