Commit dc69a07a authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[releng] Fix use of npm from build environment

parent e2e36d668e97
......@@ -10,4 +10,16 @@ if [ "$BUILDER" -lt "1" ]; then
"$ROOT/.releng/build-env.sh"
fi
docker run -it --rm --user=$(id -u) --group-add=$(id -g) -v "$ROOT:/src" -e "HOME=/npm" "logilab/ld-build-env:latest" npm $@
CD=$(pwd)
WD="/src/"
case "$CD" in
"$ROOT"* )
if [ "$CD" != "$ROOT" ]; then
S=$((${#ROOT} + 1))
SUB=$(echo "$CD" | cut -c "$S-${#CD}")
WD="/src$SUB"
fi
;;
esac
docker run -it --rm --user=$(id -u) -v "$ROOT:/src" -e "HOME=/npm" -w "$WD" -p 8080:8080 "logilab/ld-build-env:latest" npm $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment