lima-vm / lima-vm/lima

`lima disk delete` should work the same way as `limactl delete`

Open
#1,198 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

It feels inconsistent to me that a locked disk will abort the command, but a non-existing disk is simply skipped:

```
limactl disk rm foo bar
```

If `foo` doesn't exist, `bar` will still be deleted. But if `foo` exists and is locked, then `bar` will not be deleted (and there is no message to the effect that additional disks have been skipped due to the error).

I think a locked disk should be logged as an error, but additional disks should still be processed.

And then I wonder if failures of `deleteDisk()` should be treated the same way too: log an error, but continue to attempt deleting the remaining disks?

Of course the command must exit with a non-zero status code if any disk couldn't be deleted. I'm not sure how non-existing disks should be treated: should they also cause a non-zero error?

@AkihiroSuda WDYT?

_Originally posted by @jandubois in https://github.com/lima-vm/lima/pull/1065#discussion_r1020636413_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.