Fix alternatives module (#4836) (#4840)

* Only pass subcommands when they are specified as module arguments.

* When 'subcommands' is specified, 'link' must be given for every subcommand.

* Extend subcommand tests.

(cherry picked from commit 84d8ca9234)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2022-06-14 16:30:42 +02:00 committed by GitHub
commit de5fbe457f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 151 additions and 3 deletions

View file

@ -1,2 +1,3 @@
---
alternatives_dir: /var/lib/dpkg/alternatives/
alternatives_command: update-alternatives

View file

@ -1,2 +1,3 @@
---
alternatives_dir: /var/lib/rpm/alternatives/
alternatives_command: update-alternatives

View file

@ -1,2 +1,3 @@
---
alternatives_dir: /var/lib/alternatives/
alternatives_command: update-alternatives