biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / craft-providers / inject-snaps.patch
blob37f9f2f82d7e3b4a6f8a8d75343de018b859afb4
1 diff --git a/craft_providers/base.py b/craft_providers/base.py
2 index 3c914a2..d9c2cf9 100644
3 --- a/craft_providers/base.py
4 +++ b/craft_providers/base.py
5 @@ -655,37 +655,22 @@ class Base(ABC):
6 ),
9 - if snap.channel:
10 - try:
11 - snap_installer.install_from_store(
12 - executor=executor,
13 - snap_name=snap.name,
14 - channel=snap.channel,
15 - classic=snap.classic,
16 - )
17 - except SnapInstallationError as error:
18 - raise BaseConfigurationError(
19 - brief=(
20 - f"failed to install snap {snap.name!r} from store"
21 - f" channel {snap.channel!r} in target environment."
22 - ),
23 - details=error.details,
24 - ) from error
25 - else:
26 - try:
27 - snap_installer.inject_from_host(
28 - executor=executor,
29 - snap_name=snap.name,
30 - classic=snap.classic,
31 - )
32 - except SnapInstallationError as error:
33 - raise BaseConfigurationError(
34 - brief=(
35 - f"failed to inject host's snap {snap.name!r} "
36 - "into target environment."
37 - ),
38 - details=error.details,
39 - ) from error
40 + try:
41 + channel = "latest/beta"
42 + snap_installer.install_from_store(
43 + executor=executor,
44 + snap_name=snap.name,
45 + channel=channel,
46 + classic=snap.classic,
47 + )
48 + except SnapInstallationError as error:
49 + raise BaseConfigurationError(
50 + brief=(
51 + f"failed to install snap {snap.name!r} from store"
52 + f" channel {channel!r} in target environment."
53 + ),
54 + details=error.details,
55 + ) from error
57 def wait_until_ready(self, executor: Executor) -> None:
58 """Wait until base instance is ready.