craft_providers.util.snap_cmd module

Helpers for snap command.

craft_providers.util.snap_cmd.formulate_ack_command(snap_assert_path)[source]

Formulate snap ack command to add assertions.

Return type

List[str]

Returns

List of ack command parts.

Parameters

snap_assert_path (Path) –

craft_providers.util.snap_cmd.formulate_known_command(query)[source]

Formulate snap known command to retrieve assertions.

Return type

List[str]

Returns

List of ack command parts.

Parameters

query (List[str]) –

craft_providers.util.snap_cmd.formulate_local_install_command(classic, dangerous, snap_path)[source]

Formulate snap install command.

Parameters
  • classic (bool) – Flag to enable installation of classic snap.

  • dangerous (bool) – Flag to enable installation of snap without ack.

  • snap_path (Path) –

Return type

List[str]

Returns

List of command parts.

craft_providers.util.snap_cmd.formulate_pack_command(snap_name, output_file_path)[source]

Formulate the command to pack a snap from a directory.

Parameters
  • snap_name (str) – The name of the channel.

  • output_file_path – File path to the packed snap.

Return type

List[str]

Returns

List of command parts.

craft_providers.util.snap_cmd.formulate_refresh_command(snap_name, channel)[source]

Formulate snap refresh command.

Parameters
  • snap_name (str) – The name of the channel.

  • channel (str) – The channel to install the snap from.

Return type

List[str]

Returns

List of command parts.

craft_providers.util.snap_cmd.formulate_remote_install_command(snap_name, channel, classic)[source]

Formulate the command to snap install from Store.

Parameters
  • snap_name (str) – The name of the channel.

  • channel (str) – The channel to install the snap from.

  • classic (bool) – Flag to enable installation of classic snap.

  • dangerous – Flag to enable installation of snap without ack.

Return type

List[str]

Returns

List of command parts.

craft_providers.util.snap_cmd.formulate_remove_command(snap_name)[source]

Formulate snap remove command.

Parameters

snap_name (str) – The name of the channel.

Return type

List[str]

Returns

List of command parts.