From 3495f0d9ba37ec10189ce1df60921f15554224d5 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 6 Jun 2024 16:33:28 -0400 Subject: [PATCH] Use corepack yarn in `bin/setup` (#30573) --- bin/setup | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/setup b/bin/setup index 5d9622151d..93c6981d0b 100755 --- a/bin/setup +++ b/bin/setup @@ -13,17 +13,13 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' + puts "\n== Installing Ruby dependencies ==" system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') - # Install JavaScript dependencies - system! 'bin/yarn' - - # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' - # end + puts "\n== Installing JS dependencies ==" + system! 'corepack prepare' + system! 'bin/yarn install --immutable' puts "\n== Preparing database ==" system! 'bin/rails db:prepare'