mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 05:42:54 -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"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user