INNER CODE UNIT · Python
_get_program_spec_program_path_and_arguments
ansible-collections/community.vmware · plugins/connection/vmware_tools.py:405
def _get_program_spec_program_path_and_arguments(self, cmd):
if self.windowsGuest:
'''
we need to warp the execution of powershell into a cmd /c because
the call otherwise fails with "Authentication or permission failure"
#FIXME: Fix the unecessary invocation of cmd and run the command directly
'''
program_path = "cmd.exe"
arguments = "/c %s" % cmd
else:
program_path = self.get_option("executable")
arguments = re.sub(r"^%s\s*" % program_path, "", cmd)
return program_path, arguments
def _get_guest_program_spec(self, cmd, stdout, stderr):
guest_program_spec = vim.GuestProgramSpec()