I have a Windows node running with the WRM plugin for rundeck
Does anyone know how to get rid of false error for commands ran on a Windows node (Windows 11 Pro)
Here is what I run as an inline script
mkdir C:\Users\peter\CodeBase
cd C:\Users\peter\CodeBase
fsutil.exe file SetCaseSensitiveInfo "C:\Users\peter\CodeBase" enable
git clone https://github.com/scothost/AspBlog.git AspBlog
This command succeeds and the repository is checked out but i see the following output
Case sensitive attribute on directory C:\Users\peter\CodeBase is enabled.
C:\Users\peter\CodeBase>git clone https://github.com/scothost/AspBlog.git AspBlog
[ERROR ] Execution finished with the following error (winrm-exec.py:378)[root]
[ERROR ] Cloning into 'AspBlog'...
(winrm-exec.py:379)[root]
Failed: NonZeroResultCode: [WinRMPython] Result code: 1
Now if I do the following I get good output
mkdir C:\Users\peter\CodeBase
cd C:\Users\peter\CodeBase
fsutil.exe file SetCaseSensitiveInfo "C:\Users\peter\CodeBase" enable
git init
Case sensitive attribute on directory C:\Users\peter\CodeBase is enabled.
C:\Users\peter\CodeBase>git init
Initialized empty Git repository in C:/Users/peter/CodeBase/.git/
Following your last comment and the job definition you provided here, I was able to reproduce the issue.
To resolve it, switch to using the pywinrm Node Executor and File Copier (in your project). Additionally, the script logic needs to be adjusted—the failure occurs because the script attempts to create the CodeBase directory even when it already exists. You'll need to modify the script so that it either checks for the directory's existence beforehand or simply ignores the creation step if it's already there.