Skip to content

Commit

Permalink
fix: stop Finch on uninstall (#818)
Browse files Browse the repository at this point in the history
Issue #, if available: Fixes #794

*Description of changes:*
- The uninstall script runs on upgrade, and this makes the uninstall
script stop/remove Finch's VM

*Testing done:*



- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Justin Alvarez <alvajus@amazon.com>
  • Loading branch information
pendo324 authored Feb 19, 2024
1 parent 0bf9148 commit a96788b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions msi-builder/uninstall.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
@echo off
SET InstallDir=%~1

:: Stop and remove any running instance
finch.exe vm stop -f
finch.exe vm remove -f

:: Just in case
wsl --terminate lima-finch
wsl --unregister lima-finch

:: Delete files and directories if they exist
if exist "%InstallDir%\lima\" rmdir /s /q "%InstallDir%\lima\"

0 comments on commit a96788b

Please sign in to comment.