mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-19 18:03:01 -04:00
Update 98-npmglobal
fixed npm-global always being added
This commit is contained in:
@@ -8,6 +8,11 @@ if [ -f /usr/bin/npm ]; then
|
|||||||
echo "setting npm to global folder in /config"
|
echo "setting npm to global folder in /config"
|
||||||
npm config set prefix '/config/npm-global'
|
npm config set prefix '/config/npm-global'
|
||||||
|
|
||||||
echo "ensuring npm-global is in PATH"
|
if grep -q "/config/npm-global/bin" "/etc/services.d/code-server/run"; then
|
||||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-npmglobal\nexport PATH=/config/npm-global/bin:$PATH' /etc/services.d/code-server/run
|
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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user