From b7d46a0c2c7cc7dc01556f89763515bc16a75360 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 23 Apr 2025 16:02:21 +0200 Subject: [PATCH] Prevent `vite_ruby` to run yarn, always --- .github/workflows/test-ruby.yml | 2 -- Dockerfile | 1 - lib/tasks/assets.rake | 3 +++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 44c32b17de..2fa28a587c 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -58,8 +58,6 @@ jobs: ${{ matrix.mode }}-assets - name: Precompile assets - env: - VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL: true run: |- bin/rails assets:precompile diff --git a/Dockerfile b/Dockerfile index cfbc75737b..8bd1eccd71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -308,7 +308,6 @@ RUN \ # Use Ruby on Rails to create Mastodon assets SECRET_KEY_BASE_DUMMY=1 \ # Do not run `yarn` when precompiling assets, we already ran it before - VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL=true \ bundle exec rails assets:precompile; \ # Cleanup temporary files rm -fr /opt/mastodon/tmp; diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index ba418d1711..de722f6bc1 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -17,3 +17,6 @@ if Rake::Task.task_defined?('assets:precompile') Rake::Task['assets:generate_static_pages'].invoke end end + +# We don't want vite_ruby to run yarn, we do that in a separate step +Rake::Task['vite:install_dependencies'].clear