diff --git a/ct/invoiceshelf.sh b/ct/invoiceshelf.sh index e6dee2377..15fa2c368 100644 --- a/ct/invoiceshelf.sh +++ b/ct/invoiceshelf.sh @@ -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 diff --git a/install/invoiceshelf-install.sh b/install/invoiceshelf-install.sh index 6160c66f5..368fcf6e6 100644 --- a/install/invoiceshelf-install.sh +++ b/install/invoiceshelf-install.sh @@ -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