Add cpanm option --with-recommends (#9555)

* Add cpanm option --with-recommands

Fix #9554

* With accepted suggestions

* Use install_recommendations for cpanm option --with-recommends

* Fix typo in changelogs/fragments/9554

recommands -> recommends

* Doc for options users have for recommands and suggests dependencies

* Add new args to the command runner.

* Add test for cpanm --with-recommends
This commit is contained in:
Erwan Colin 2025-01-15 20:30:15 +01:00 committed by GitHub
commit e2d19a968b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 73 additions and 1 deletions

View file

@ -361,3 +361,43 @@ test_cases:
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- id: install_dancer_with_recommends
input:
name: Dancer2
install_recommendations: true
output:
changed: true
mocks:
run_command:
- command: [/testbin/cpanm, --version]
environ: *env-def-true
rc: 0
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/cpanm, --with-recommends, Dancer2]
environ: *env-def-true
rc: 0
out: ""
err: ""
- id: install_dancer_with_suggests
input:
name: Dancer2
install_suggestions: true
output:
changed: true
mocks:
run_command:
- command: [/testbin/cpanm, --version]
environ: *env-def-true
rc: 0
out: |
cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm)
perl version 5.041005 (/usr/local/bin/perl)
err: ""
- command: [/testbin/cpanm, --with-suggests, Dancer2]
environ: *env-def-true
rc: 0
out: ""
err: ""