mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-01-21 04:43:29 +08:00
Update 98-npmglobal
fixed npm-global always being added
This commit is contained in:
parent
dfab3bc3f6
commit
1850d6f893
@ -8,6 +8,11 @@ if [ -f /usr/bin/npm ]; then
|
||||
echo "setting npm to global folder in /config"
|
||||
npm config set prefix '/config/npm-global'
|
||||
|
||||
echo "ensuring npm-global is in PATH"
|
||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-npmglobal\nexport PATH=/config/npm-global/bin:$PATH' /etc/services.d/code-server/run
|
||||
if grep -q "/config/npm-global/bin" "/etc/services.d/code-server/run"; then
|
||||
echo "npm-global already in PATH"
|
||||
else
|
||||
echo "ensuring npm-global is in PATH"
|
||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-npmglobal\nexport PATH=/config/npm-global/bin:$PATH' /etc/services.d/code-server/run
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user