Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62484

Pyenv corrupt VIRTUAL_ENV env var on Windows.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pyenv-pipeline-plugin
    • None
    • Windows builder

      On Windows, pyenv plugin add a '\r' in env vars, by example VIRTUAL_ENV.

      Parsing function for env vars 'fromEnvOutput' use '\n' as delimiter. This may keep '\r' in env var value.

      We need to fix this in regex, or calling '.trim()' on returned value.

      This was found because CMake "findPython" module fail to find venv python if VIRTUAL_ENV value is malformed.

      Workaround: call trim right after this step like:

      // Cleanning line break in VIRTUAL_ENV var
      withEnv(["VIRTUAL_ENV=${env.VIRTUAL_ENV.trim()}"]) {
       ...
      }

      See: https://github.com/jenkinsci/pyenv-pipeline-plugin/blob/4899062f85d36e61980ba77b48b52ea12bbf6924/src/main/java/com/github/pyenvpipeline/jenkins/VirtualenvManager.java#L186

            Unassigned Unassigned
            framillien Florian Ramillien
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: