From aac842535d49a1be634c69e75aeee713a7ba9da5 Mon Sep 17 00:00:00 2001 From: teknowledgist Date: Fri, 9 Feb 2024 13:06:45 -0500 Subject: [PATCH] (tixati) revised fix for (#2182) --- automatic/tixati/tools/chocolateyInstall.ps1 | 4 ++-- automatic/tixati/tools/chocolateyUninstall.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/automatic/tixati/tools/chocolateyInstall.ps1 b/automatic/tixati/tools/chocolateyInstall.ps1 index 51e3ce58bdf..842c0e41954 100644 --- a/automatic/tixati/tools/chocolateyInstall.ps1 +++ b/automatic/tixati/tools/chocolateyInstall.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' -foreach ($process in (Get-Process "$env:ChocolateyPackageName*" -ErrorAction SilentlyContinue)) { - Stop-Process -Name $process.ProcessName -Force +if (Get-Process "Tixati*" -ErrorAction SilentlyContinue) { + Throw "Tixati is running! To prevent data loss, please fully quit Tixati before attempting to upgrade it." } $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition diff --git a/automatic/tixati/tools/chocolateyUninstall.ps1 b/automatic/tixati/tools/chocolateyUninstall.ps1 index 2d683603f5f..acf0eb76514 100644 --- a/automatic/tixati/tools/chocolateyUninstall.ps1 +++ b/automatic/tixati/tools/chocolateyUninstall.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' -foreach ($process in (Get-Process "$env:ChocolateyPackageName*" -ErrorAction SilentlyContinue)) { - Stop-Process -Name $process.ProcessName -Force +if (Get-Process "Tixati*" -ErrorAction SilentlyContinue) { + Throw "Tixati is running! To prevent data loss, please fully quit Tixati before attempting to uninstall it." } $packageName = 'tixati'