translations: Fix nodejs install
We're not using local install yet, so make the nodejs function handle running in a venv. Currently it fails with: "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." Change-Id: I7a62a6fb236286c967fe2fbfb0266e016d3dcecf
This commit is contained in:
parent
6000fd9b6e
commit
d8c76a79a7
@ -105,9 +105,19 @@ function setup_venv {
|
||||
# the one used in the nodejs6-npm jobs.
|
||||
function setup_nodeenv {
|
||||
|
||||
pip install --user nodeenv
|
||||
# The ensure-babel and ensure-sphinx roles create a venv in
|
||||
# ~/.venv containing the needed software. However, it's possible
|
||||
# we may want to switch that to using pip install --user and
|
||||
# ~/.local instead of a venv, so make this compatible with either.
|
||||
|
||||
NODE_VENV=~/.local/node_venv
|
||||
~/.local/bin/nodeenv --node 6.9.4 $NODE_VENV
|
||||
if [ -d ~/.venv ] ; then
|
||||
pip install nodeenv
|
||||
nodeenv --node 6.9.4 $NODE_VENV
|
||||
else
|
||||
pip install --user nodeenv
|
||||
~/.local/bin/nodeenv --node 6.9.4 $NODE_VENV
|
||||
fi
|
||||
source $NODE_VENV/bin/activate
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user