-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
Windows slaves, UNC path to workspace at slave
Hello,
We have several Win7 nodes, which use workspaces at unmapped shared directories (we use UNC path at slave configuration). For those nodes, “Execute Windows batch command” build step incorrectly changes working directory before execution of script (see log below). Unfortunately, cmd only prints warning to console and then executes script in Windows directory.
It would be great to add UNC path check before script executtion(even if it fails the build). For example, in case of admin rights flushing of working directory from “Execute Windows batch command” could cause… unexpected results
I propose to add check of working directory path at hudson::tasks::BatchFile::getContents(). If working directory has UNC format, it is possible to extend script content by pushd/popd wrapper (see http://superuser.com/questions/282963/can-you-browse-a-unc-path-using-a-command-line-environment-without-mapping-it-to).
Log:
Started by user Oleg Nenashev
[EnvInject] - Loading node environment variables.
Building remotely on ${MY_NODE} in workspace
${NODE_WORKSPACE}
[Test_BatchOnSharedWorkspace] $ cmd /c call C:\Users\${MY_USER} \AppData \Local\Temp\hudson1138943559754710435.bat
'
${NODE_WORKSPACE}’
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
C:\Windows>dir
Volume in drive C is System
Volume Serial Number is ${MY_SN}
Directory of C:\Windows