lima-vm / lima-vm/lima

The `--yes` option is inconsistent and confusing

Open
#3,995 10 comments 1 reaction 1 assignee Claimed by @jandubois View on GitHub
area/cli
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

This doesn't make any sense:

```console
❯ l clone default clone
? Do you want to start the instance now? (Y/n)
FATA[0004] interrupt

❯ l delete clone
...

❯ l --yes clone default clone
=> does not start the new instance
```

Whereas `limactl --yes create foo` will start the new instance right away.

Same thing for `limactl edit`:

```console
❯ l edit clone --cpus 3
INFO[0000] Instance "clone" configuration edited
? Do you want to start the instance now? (Y/n)
FATA[0002] interrupt

❯ l --yes edit clone --cpus 4
INFO[0000] Instance "clone" configuration edited
=> does not start the updated instance
```

Linguistically `yes` is not a synonym for "no tty". It is an affirmative. So why doesn't it start the instance?

There are 2 reasonable definitions for `--yes`:

1. It implies the user presses `ENTER` to all normally interactive prompts, selecting the default choice.
2. It is only accepted by commands that can start an instance, and it means "yes, start it"

The fact that `--tty=false` doesn't mean you pick the default choice for prompts makes this even more confusing.

The current definition makes no sense (except on the `limactl start` command).

This cannot be fixed in a backwards compatible way, so I would like to figure out how (or if) we want to change it for 2.0, when we have a chance to introduce breaking changes.

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.