Remove VM from cache and destroy with spinner

This commit is contained in:
Chris Wanstrath 2026-02-25 12:29:47 -08:00
parent a025d302dc
commit 16d67fa3e7

View File

@ -74,8 +74,14 @@ export function register(program: Command) {
.command("destroy")
.description("Stop and delete the VM")
.action(async () => {
await vm.destroy()
console.log("✔ VM destroyed")
const spin = spinner("Destroying VM")
try {
await vm.destroy()
spin.succeed("VM destroyed")
} catch (err) {
spin.fail(String((err as Error).message ?? err))
process.exit(1)
}
})
vmCmd