You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment:
Rundeck Enterprise 3.3.6
PyWinRM 2.0.10 - CMD interpreter (Powershell not allowed)
Not happening on JSCH for linux nodes.
When using options with Windows paths that uses backslashes, i.e: C:\test\${option.script} Rundeck does escape those backslashes by adding single quotes to it. When this is added and then passed to Windows CMD, i.e to list the fullpath: dir C:\test\${option.script} the command fails due to single quotes
Within the PyWinRm plugin code there is this line that retrieves the command from env variable, which is the failing one:
exec_command = os.getenv("RD_EXEC_COMMAND")
When this variable is replaced with nothing or double quotes, the command runs successfully:
exec_command = exec_command.replace("'", """)
Although this workaround can retrieve unexpected outputs (if single quotes are explicitly needed on output) from more complex job workflows.
The text was updated successfully, but these errors were encountered:
nvalenzuela20
added a commit
to nvalenzuela20/py-winrm-plugin
that referenced
this issue
Dec 21, 2020
Environment:
Rundeck Enterprise 3.3.6
PyWinRM 2.0.10 - CMD interpreter (Powershell not allowed)
Not happening on JSCH for linux nodes.
When using options with Windows paths that uses backslashes, i.e: C:\test\${option.script} Rundeck does escape those backslashes by adding single quotes to it. When this is added and then passed to Windows CMD, i.e to list the fullpath: dir C:\test\${option.script} the command fails due to single quotes
Within the PyWinRm plugin code there is this line that retrieves the command from env variable, which is the failing one:
exec_command = os.getenv("RD_EXEC_COMMAND")
When this variable is replaced with nothing or double quotes, the command runs successfully:
exec_command = exec_command.replace("'", """)
Although this workaround can retrieve unexpected outputs (if single quotes are explicitly needed on output) from more complex job workflows.
The text was updated successfully, but these errors were encountered: