-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
envinject-2.3.0
**Sample code and veriables.
Properties Content:
TEMPDRIVE=C: TEMPDIR=\\Windows\\TEMP
Pipeline Script:
node { int rc = bat returnStatus: true, script: """ set TEMPDRIVE=${env.TEMPDRIVE} set TEMPDIR=${env.TEMPDIR} %TEMPDRIVE% & cd %TEMPDIR% echo %CD% """ }
Results:
[Pipeline] {
[Pipeline] bat
C:\Program Files (x86)\Jenkins\workspace\testpath>set TEMPDRIVE=C:
C:\Program Files (x86)\Jenkins\workspace\testpath>set TEMPDIR=\\Windows\Temp
C:\Program Files (x86)\Jenkins\workspace\testpath>C: & cd \\Windows\Temp
'\\Windows\Temp'
CMD does not support UNC paths as current directories.
C:\Program Files (x86)\Jenkins\workspace\testpath>echo C:\Program Files (x86)\Jenkins\workspace\testpath
C:\Program Files (x86)\Jenkins\workspace\testpath
[Pipeline] }
Expected Result:
[Pipeline] { [Pipeline] bat C:\Program Files (x86)\Jenkins\workspace\testpath>set TEMPDRIVE=C: C:\Program Files (x86)\Jenkins\workspace\testpath>set TEMPDIR=\Windows\Temp C:\Program Files (x86)\Jenkins\workspace\testpath>C: & cd \Windows\Temp C:\Windows\Temp>echo C:\Windows\Temp C:\Windows\Temp [Pipeline] }
**
It seems it is due to the following update.