mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-21 06:26:24 +01:00
Fix cleanup issues in npm cache and rustup toolchain (#10107)
Issue 1 - BentoPDF (npm cache clean failure): - npm cache clean --force can fail with ENOTEMPTY on corrupted caches - Added npm cache verify before clean to detect/fix corruption - Explicitly redirect stderr to suppress error noise Issue 2 - Linkwarden (rustup toolchain removed too early): - Script deleted ~/.rustup during build cleanup - Later cleanup_lxc() tried to run 'cargo clean' without toolchain - Now only remove cargo cache dirs, preserve ~/.rustup toolchain Files changed: - misc/core.func (cleanup_lxc function) - install/linkwarden-install.sh (install script) - ct/linkwarden.sh (update function) Both changes improve reliability of container cleanup process.
This commit is contained in:
committed by
GitHub
parent
fdb722fae3
commit
21e0a8fced
@ -52,7 +52,7 @@ function update_script() {
|
||||
$STD yarn web:build
|
||||
$STD yarn prisma:deploy
|
||||
[ -d /opt/data.bak ] && mv /opt/data.bak /opt/linkwarden/data
|
||||
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache ~/.rustup
|
||||
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache
|
||||
rm -rf /root/.cache/yarn
|
||||
rm -rf /opt/linkwarden/.next/cache
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
@ -62,7 +62,7 @@ EOF
|
||||
$STD yarn prisma:generate
|
||||
$STD yarn web:build
|
||||
$STD yarn prisma:deploy
|
||||
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache ~/.rustup
|
||||
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache
|
||||
rm -rf /root/.cache/yarn
|
||||
rm -rf /opt/linkwarden/.next/cache
|
||||
msg_ok "Installed Linkwarden"
|
||||
|
||||
@ -816,7 +816,10 @@ cleanup_lxc() {
|
||||
fi
|
||||
|
||||
# Node.js npm
|
||||
if command -v npm &>/dev/null; then $STD npm cache clean --force || true; fi
|
||||
if command -v npm &>/dev/null; then
|
||||
$STD npm cache verify 2>/dev/null || true
|
||||
$STD npm cache clean --force 2>/dev/null || true
|
||||
fi
|
||||
# Node.js yarn
|
||||
if command -v yarn &>/dev/null; then $STD yarn cache clean || true; fi
|
||||
# Node.js pnpm
|
||||
|
||||
Reference in New Issue
Block a user