-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: envinject-plugin
-
None
-
Environment: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.