From 412dac7556b0b038eac14db0810014824a7165f1 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 16 Aug 2023 09:56:24 +1000 Subject: [PATCH] Don't show extra red messages when gems missing When a gem is missing, it looks like a big ugly error. But we don't need to see this, because bundle install will run next and tell us which gems its installing. Bundle check isn't actually necessary because bundle install will handle this, but for some reason it's 300ms slower. So I chose to keep 'check' to help keep this script nice and quick. --- bin/setup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/setup b/bin/setup index f4afd7b265..6336211b4a 100755 --- a/bin/setup +++ b/bin/setup @@ -17,7 +17,8 @@ FileUtils.chdir APP_ROOT do puts "== Installing dependencies ==" system! "script/install-bundler" - system("bundle check") || system!(BUNDLE_ENV, "bundle install") + # Check first (it's quicker), then install new gems if necessary + system("bundle check 2> /dev/null") || system!(BUNDLE_ENV, "bundle install") # Install JavaScript dependencies system("bin/yarn")