forked from canonical/craft-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
printer: enhance ephemeral message handover after pause() or stop()
It is a very common pattern for craft tools to start the session directly on a host machine, but launch another craft instance to do the actual work inside LXD or Multipass. In order for a seamless CLI experience (which looks identical between a 'destructive build' on the host, LXD or Multipass), we need support for progress messages (ephemeral=True) to seamlessly cross the boundaries between the host and the container instance of of the craft tool. Please see examples.py canonical#26 for an example. Add support for _Printer to respect ephemeral messages when stopping. On printer stop(), these messages are no longer terminated with a newline, but instead the printer will clear and reset the cursor to the start of the line. This behaviour change will allow subsequent terminal writes by a different process the ability to reuse a terminal line previously used as ephemeral output.
- Loading branch information
Showing
4 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters