Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use --start flag to start VM for 'clone' and 'edit' commands #4108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jandubois merged 1 commit into lima-vm:master from Horiodino:depricate--yes
Oct 30, 2025

Conversation

@Horiodino
Copy link
Contributor

@Horiodino Horiodino commented Sep 29, 2025

This PR addresses [Issue #3995] regarding the confusing and inconsistent behavior of the --yes flag in limactl clone and limactl edit. The following changes have been made:

Changes

  1. Deprecate --yes flag for the clone and edit commands. A warning is shown when used, recommending --start instead.
  2. Add --start flag (default: true) to both commands, allowing users to explicitly control whether the instance is started after cloning or editing.

@AkihiroSuda AkihiroSuda added the area/cli limactl CLI user experience label Sep 29, 2025
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Sep 29, 2025
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait for feedback from @AkihiroSuda before making any changes.

Copy link
Member

@jandubois jandubois Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think we should remove --yes from being a global option that shows up in limactl help. start, edit, and clone are the only commands that check the value of the --tty setting, so it really only applies to start now.

So I would make it a local option in those 3 commands, and make it hidden in edit and clone, so it really becomes just a start option.

@AkihiroSuda You seemed to have reservations about making the deprecated option hidden. What is the reason for that?

Copy link
Member

@AkihiroSuda AkihiroSuda Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seemed to have reservations about making the deprecated option hidden. What is the reason for that?

Because we have been keeping other deprecated commands/options.
(limactl show-ssh)

Copy link
Member

@jandubois jandubois Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I don't understand why this makes sense: the point of deprecation is to transition away from something because it will go away. Keeping it available for new users to discover and use is not helpful.

Only users that already know about these commands (or existing scripts) should continue to use them, but get a warning, so they can transition away before the commands get removed. If there is no intention of removing a command or feature, then there is no point in deprecating it.

Copy link
Member

@jandubois jandubois Oct 3, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I would make it a local option in those 3 commands, and make it hidden in edit and clone, so it really becomes just a start option.

We definitely need to make it a local option if we don't want to hide the deprecated option. That way we can mark it in the --help output for edit and clone as deprecated (which it isn't right now):

l edit --help
Edit an instance of Lima or a template
...
Global Flags:
...
 -y, --yes Alias of --tty=false

But also so that --yes doesn't show up for every single subcommand when it really is just an option for start anymore.

One big reason for getting rid of --yes is to avoid user confusion, and we are not achieving this by keeping it very visible.

if cmd.Flags().Changed("yes") {
switch cmd.Name() {
case "clone", "edit":
logrus.Warn("--yes flag is deprecated for the '" + cmd.Name() + "' command, use --start instead and --tty=false")
Copy link
Member

@jandubois jandubois Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand the warning. --start has different semantics than --yes, so --start=false may be the same as --yes=true, but --start=true (start without asking) is different from --yes=false (ask about starting).

I think the edit and clone commands should just print the simplified message:

Suggested change
logrus.Warn("--yes flag is deprecated for the '"+cmd.Name() +"' command, use --start instead and --tty=false")
logrus.Warn("The --yes flag is deprecated")

Users can then run limactl edit --help to learn more.

Copy link
Member

@AkihiroSuda AkihiroSuda Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about:

Suggested change
logrus.Warn("--yes flag is deprecated for the '"+cmd.Name() +"' command, use --start instead and --tty=false")
logrus.Warn("--yes flag is deprecated (--tty=false is still supported and works in the same way. Also consider using --start)")

jandubois and Horiodino reacted with thumbs up emoji

if cmd.Flags().Changed("yes") {
switch cmd.Name() {
case "clone", "edit":
Copy link
Member

@AkihiroSuda AkihiroSuda Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now "rename" has to be covered too

Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve merge conflicts and add support for the limactl rename command as well.

Copy link
Member

@Horiodino Could you update the PR?

Copy link
Contributor Author

Horiodino commented Oct 24, 2025 via email

Hey I'm out of town I will do ASAP as I return.
...
On Fri, 24 Oct, 2025, 6:03 am Akihiro Suda, ***@***.***> wrote: *AkihiroSuda* left a comment (lima-vm/lima#4108) <#4108 (comment)> @Horiodino <https://github.com/Horiodino> Could you update the PR? — Reply to this email directly, view it on GitHub <#4108 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXWHYSCDLVUTAGZGB7WCBID3ZFXUXAVCNFSM6AAAAACHZTFEV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINBQGA4DQOBYGI> . You are receiving this because you were mentioned.Message ID: ***@***.***>

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Horiodino reacted with thumbs up emoji
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'm going to approve and merge this to get the --start option into the Lima 2.0 release.

But I don't think it has solved the confusion around --yes being a global option for all commands. But we can address this later; it is mostly about deprecating/hiding it from the --help output.

@jandubois jandubois merged commit 4fcc789 into lima-vm:master Oct 30, 2025
62 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jandubois jandubois jandubois approved these changes

@AkihiroSuda AkihiroSuda AkihiroSuda approved these changes

Assignees

No one assigned

Labels

area/cli limactl CLI user experience

Projects

None yet

Milestone

v2.0.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /