Fix InvoiceShelf install/update package manager execution. (#15141)

Use Corepack-managed Yarn when available so installs respect upstream packageManager metadata and avoid Yarn classic mismatch failures during both fresh installs and updates.
This commit is contained in:
Michel Roegl-Brunner
2026-06-16 16:04:22 +02:00
committed by GitHub
parent e08719ac3f
commit 6c23883d94
2 changed files with 16 additions and 4 deletions
+8 -2
View File
@@ -52,8 +52,14 @@ function update_script() {
msg_info "Updating Application"
cd /opt/invoiceshelf
$STD composer install --no-dev --optimize-autoloader
$STD yarn install
$STD yarn build
if command -v corepack >/dev/null 2>&1; then
$STD corepack enable
$STD corepack yarn install
$STD corepack yarn build
else
$STD yarn install
$STD yarn build
fi
$STD php artisan migrate --force
$STD php artisan optimize:clear
chown -R www-data:www-data /opt/invoiceshelf
+8 -2
View File
@@ -39,8 +39,14 @@ sed -i "s|^DB_USERNAME=.*|DB_USERNAME=${PG_DB_USER}|" .env
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" .env
COMPOSER_ALLOW_SUPERUSER=1 $STD composer install --no-dev --optimize-autoloader --no-interaction
$STD php artisan key:generate
$STD yarn install
$STD yarn build
if command -v corepack >/dev/null 2>&1; then
$STD corepack enable
$STD corepack yarn install
$STD corepack yarn build
else
$STD yarn install
$STD yarn build
fi
mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache
chown -R www-data:www-data /opt/invoiceshelf
chmod -R 775 storage bootstrap/cache