Skip to content

limactl shell: synced directory is deleted when sync dialog does not exit gracefully #4997

@joe-p

Description

@joe-p

Description

If a shell session is started with --sync . and then exit is called the user is presented with a prompt for whether or not they want sync the guest changes back to the host

? ⚠️ Accept the changes? (added: 0, deleted: 0, modified: 1, metadata: 1)  [Use arrows to move, type to filter]
> Yes
  No
  View the changed contents

If the process is then killed at this point (for example via SIGINT) then the directory on the guest is deleted. This means the work done in the guest is now gone without a straightforward way to recover.

I would expect the data in the guest to persist if limactl does not exit gracefully. This is the case when the diff pager is killed with SIGINT and when the parent process of the limactl shell is killed before exiting the shell, so I believe this behavior only exists when in the prompt dialog.

On MacOS 26.4.1 with limactl version 2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clilimactl CLI user experiencebugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions