Skip to content

Commit

Permalink
Pip: Write a meaningful error to the report if installing dependencie…
Browse files Browse the repository at this point in the history
…s fails

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@here.com>
  • Loading branch information
sschuberth committed May 3, 2019
1 parent e2c5bfc commit 496da07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analyzer/src/main/kotlin/managers/Pip.kt
Expand Up @@ -501,7 +501,11 @@ class Pip(
}

virtualEnvDir = createVirtualEnv(workingDir, projectPythonVersion)
installDependencies(workingDir, definitionFile, virtualEnvDir).requireSuccess()
val install = installDependencies(workingDir, definitionFile, virtualEnvDir)
if (install.isError) {
// pip writes the real error message to stdout instead of stderr.
throw IOException(install.stdout)
}

log.info {
"Successfully installed dependencies for project '$definitionFile' using Python $projectPythonVersion."
Expand Down

0 comments on commit 496da07

Please sign in to comment.