From 0abb9a557e0ab5f883c3cc48b3a644423f140a1d Mon Sep 17 00:00:00 2001 From: Mike Aldred Date: Fri, 20 Mar 2026 17:52:41 +0800 Subject: [PATCH] Address review feedback from russoz Remove redundant 'should generally be left enabled' description line and simplify become command return by removing unnecessary flags conditional. --- plugins/become/pfexec.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/become/pfexec.py b/plugins/become/pfexec.py index 7efd21cd8d..772cfa5383 100644 --- a/plugins/become/pfexec.py +++ b/plugins/become/pfexec.py @@ -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}"