Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions docs/how-to-guides/snap-development/use-snapctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,11 @@ snapctl remove +<comp_name>

If these commands are run from a {ref}`hook <reference-development-supported-snap-hooks>`, the components will be installed/removed after the hook itself has run if it ended successfully.

## snapctl commands
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

First bit almost repeats section above, omit for clarity


From within a snap, the [snapctl](https://snapcraft.io/docs/using-snapctl) command can be used to install and remove components from an application, including snap hooks and component hooks. The commands for this are:

$ snapctl install +<comp_name>

$ snapctl remove +<comp_name>

If these commands are run from a hook, the components will be installed/removed after the hook itself has run if it ended successfully.
### Asynchronous Operation
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I couldn't see anywhere else that obviously describes snapctl operation so I feel this may be the most appropriate place in the docs for this

These commands are run synchronously by default, however, if snapctl supports the _async_ feature, then the `--no-wait` flag can be used to
immediately return a change ID, which can then be polled with snapctl is-ready <change-id>. To view all change-ids associated with a snapctl
context, the command `snapctl tasks` may be used. Optionally, the `--json` flag may be passed to return the data as JSON rather than a tabular
representation.

## Health state

Expand Down
Loading