Skip to content

Commit

Permalink
hold snap revision to prevent refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Sep 18, 2023
1 parent 7f630c9 commit ab4bda8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ def _install_snap_packages(self, packages: List[str]) -> None:
snap_package.ensure(
snap.SnapState.Latest, channel=snap_channel, revision=snap_revision
)
# snaps will auto refresh so it is necessary to hold the current revision
snap_package.hold()

except snap.SnapError as e:
logger.error(
Expand Down

0 comments on commit ab4bda8

Please sign in to comment.