Skip to content

Commit

Permalink
Fix CiHelper function checkPythonExec to use 'pip3 install --user' an…
Browse files Browse the repository at this point in the history
…d improve error message (#12097)

* Fix pip3 install function to use --user

* Update error message to reflect somethign closer to reality.
  • Loading branch information
damonreed committed Sep 15, 2020
1 parent 2dfb375 commit e0a0764
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions LibreNMS/Util/CiHelper.php
Expand Up @@ -491,13 +491,15 @@ private function checkPythonExec($exec)
}

echo "Running pip3 install to install developer dependencies.\n";
passthru("pip3 install $exec"); // probably wrong in other cases...
passthru("pip3 install --user $exec"); // probably wrong in other cases...

if (is_executable($path)) {
return $path;
}

echo "\nRunning installing deps with pip3 failed.\n You should try running 'pip3 install -r requirements.txt' by hand\n";
echo "\nRunning installing deps with pip3 failed.\n You should try running 'pip3 install --user ";
echo $exec;
echo "' by hand\n";
echo "You can find more info at http://docs.librenms.org/Developing/Validating-Code/\n";
exit(1);
}
Expand Down

0 comments on commit e0a0764

Please sign in to comment.