mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-14 19:29:48 +00:00
Update tools.func (#5488)
This commit is contained in:
parent
dfd612480c
commit
0a72c81ea5
1 changed files with 9 additions and 0 deletions
|
@ -75,6 +75,15 @@ function setup_nodejs() {
|
||||||
|
|
||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
|
|
||||||
|
# Ensure valid working directory for npm (avoids uv_cwd error)
|
||||||
|
if [[ ! -d /opt ]]; then
|
||||||
|
mkdir -p /opt
|
||||||
|
fi
|
||||||
|
cd /opt || {Add commentMore actions
|
||||||
|
msg_error "Failed to set safe working directory before npm install"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# Install global Node modules
|
# Install global Node modules
|
||||||
if [[ -n "$NODE_MODULE" ]]; then
|
if [[ -n "$NODE_MODULE" ]]; then
|
||||||
IFS=',' read -ra MODULES <<<"$NODE_MODULE"
|
IFS=',' read -ra MODULES <<<"$NODE_MODULE"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue