Skip to content

Text formatting mode is not closed/reset properly and ends up leaking unto other terminal lines #1319

@SukritBhatt

Description

@SukritBhatt

Description

The second prompt for the delete command:
this will delete ALL container data. Are you sure you want to continue? [y/N]
uses a bold + red format mode.

However, this mode is not reset at the end of the line and thus ends up leaking unto newer lines on the terminal if declined.

Image

Version

$colima version && limactl --version && qemu-img --version
colima version HEAD-5d2e91c
git commit: 5d2e91c4a491d4ae35d69fb2583f4f959401bc37
limactl version 1.0.7
qemu-img version 10.0.0
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers

This happens both on the current stable release (0.8.1 at the time of writing) and the current tip of master (as shown in the terminal output above).

Operating System

Apple Silicon >= 14 (Sonoma)

Output of colima status

$colima status -p myvm
INFO[0000] colima [profile=myvm] is running using QEMU 
INFO[0000] arch: x86_64                                 
INFO[0000] runtime: docker                              
INFO[0000] mountType: 9p                                
INFO[0000] socket: unix:///Users/sukritbhatt/.colima/myvm/docker.sock 

Reproduction Steps

  1. Create a new VM (if you are not comfortable deleting a pre-existing one, otherwise go directly to step 2)
    colima start -p myvm
  2. Delete the VM colima delete -p myvm
  3. Confirm (type y) the first prompt: are you sure you want to delete colima [profile=myvm] and all settings? [y/N]
  4. Decline (type anything but y or Y) the follow-up prompt: this will delete ALL container data. Are you sure you want to continue? [y/N]
  5. Observe now that all following lines on your terminal inherit the same red + bold formatting of the second prompt.

Expected behaviour

New lines on the terminal should revert to the normal formatting instead of inheriting the special formatting of the confirmation prompt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions