Remove VM from cache and destroy with spinner
This commit is contained in:
parent
a025d302dc
commit
16d67fa3e7
|
|
@ -74,8 +74,14 @@ export function register(program: Command) {
|
||||||
.command("destroy")
|
.command("destroy")
|
||||||
.description("Stop and delete the VM")
|
.description("Stop and delete the VM")
|
||||||
.action(async () => {
|
.action(async () => {
|
||||||
await vm.destroy()
|
const spin = spinner("Destroying VM")
|
||||||
console.log("✔ VM destroyed")
|
try {
|
||||||
|
await vm.destroy()
|
||||||
|
spin.succeed("VM destroyed")
|
||||||
|
} catch (err) {
|
||||||
|
spin.fail(String((err as Error).message ?? err))
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vmCmd
|
vmCmd
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user