Fix Hoarder corepack install/update error (#1957)

Installs Corepack v0.31.0 during Hoarder installation; checks if
Corepack needs updating during Hoarder update.
This commit is contained in:
Chris
2025-02-03 03:06:40 -05:00
committed by GitHub
parent 745d1f9444
commit 91ba5cd412
2 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,9 @@ function update_script() {
systemctl stop hoarder-web hoarder-workers hoarder-browser
msg_ok "Stopped Services"
msg_info "Updating ${APP} to v${RELEASE}"
if [[ $(corepack -v) < "0.31.0" ]]; then
npm install -g corepack@0.31.0 &>/dev/null
fi
cd /opt
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
mkdir -p /etc/hoarder