mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
Update 98-npmglobal
fix npmglobal
This commit is contained in:
@@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
# check npm exists
|
# check npm exists
|
||||||
if [ -f /usr/bin/npm ]; then
|
if [ -f /usr/bin/npm ]; then
|
||||||
## Ubuntu
|
echo "creating npm global folder in /config"
|
||||||
mkdir /config/.npm-global
|
mkdir -p /config/npm-global
|
||||||
npm config set prefix '/config/.npm-global'
|
|
||||||
export PATH=/config/.npm-global/bin:$PATH
|
echo "setting npm to global folder in /config"
|
||||||
source ~/.profile
|
npm config set prefix '/config/npm-global'
|
||||||
fi
|
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user