1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix snap's channel option. (#3028) (#3029)

(cherry picked from commit 7b9687f758)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2021-07-19 09:40:11 +02:00 committed by GitHub
parent e1aad0db30
commit f0d6fcb3fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "snap - fix formatting of ``--channel`` argument when the ``channel`` option is used (https://github.com/ansible-collections/community.general/pull/3028)."

View file

@ -145,7 +145,7 @@ class Snap(CmdStateModuleHelper):
actionable_snaps=dict(fmt=lambda v: v), actionable_snaps=dict(fmt=lambda v: v),
state=dict(fmt=_state_map), state=dict(fmt=_state_map),
classic=dict(fmt="--classic", style=ArgFormat.BOOLEAN), classic=dict(fmt="--classic", style=ArgFormat.BOOLEAN),
channel=dict(fmt=lambda v: [] if v == 'stable' else ['--channel', '{0}']), channel=dict(fmt=lambda v: [] if v == 'stable' else ['--channel', '{0}'.format(v)]),
) )
check_rc = False check_rc = False