jenkinsci / pyenv-pipeline-plugin

Execute commands in Python virtualenvs in Jenkins Pipeline DSL
https://plugins.jenkins.io/pyenv-pipeline/
MIT License
33 stars 15 forks source link

[Windows 10] Trailing \r in VIRTUAL_ENV #38

Open lystor opened 4 years ago

lystor commented 4 years ago

Hello VIRTUAL_ENV env variable contains trailing \r in Windows 10. Please remove \r. Thank you

node("kvpcXXXXXX") {
    withPythonEnv("${LOCALAPPDATA}\\Programs\\Python\\Python37\\python.exe") {
        echo("VIRTUAL_ENV: BEGIN|${VIRTUAL_ENV}|END")
        bat "set"
    }
}

Output:

[Pipeline] echo
VIRTUAL_ENV: BEGIN|d:\workspace\nikolayul_test1\.pyenv-Users-build-AppData-Local-Programs-Python-Python37-python.exe
|END
[Pipeline] bat

(.pyenv-Users-build-AppData-Local-Programs-Python-Python37-python.exe) d:\workspace\nikolayul_test1>
set
...
USERPROFILE=C:\Users\build
VIRTUAL_ENV=d:\workspace\nikolayul_test1\.pyenv-Users-build-AppData-Local-Programs-Python-Python37-python.exe

windir=C:\Windows
...
framillien commented 4 years ago

Reported in JIRA too: https://issues.jenkins-ci.org/browse/JENKINS-62484

elupus commented 4 months ago

Ran into this too. Took way too long to figure out.