1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00

Address review feedback from russoz

Remove redundant 'should generally be left enabled' description line
and simplify become command return by removing unnecessary flags
conditional.
This commit is contained in:
Mike Aldred 2026-03-20 17:52:41 +08:00
parent 192759b85d
commit 0abb9a557e

View file

@ -77,7 +77,6 @@ options:
- Toggle to wrap the command C(pfexec) calls in C(shell -c) or not.
- Unlike C(sudo), C(pfexec) does not interpret shell constructs internally,
so commands containing shell operators must be wrapped in a shell invocation.
- This should generally be left enabled.
default: true
type: bool
ini:
@ -108,6 +107,4 @@ class BecomeModule(BecomeBase):
flags = self.get_option("become_flags")
noexe = not self.get_option("wrap_exe")
become_cmd = self._build_success_command(cmd, shell, noexe=noexe)
if flags:
return f"{exe} {flags} {become_cmd}"
return f"{exe} {become_cmd}"
return f"{exe} {flags} {become_cmd}"