From b64b0f33824aa11c75b9914307453b9c18401bdb Mon Sep 17 00:00:00 2001 From: Masayuki Takeda Date: Mon, 12 Apr 2021 20:00:40 +0800 Subject: [PATCH] check if Gemfile.lock exists --- middleman/start.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/middleman/start.sh b/middleman/start.sh index f5753f0..714534a 100644 --- a/middleman/start.sh +++ b/middleman/start.sh @@ -15,7 +15,11 @@ export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 unset BUNDLER_VERSION -gem install bundler +if [ -f "Gemfile.lock" ]; then + gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" +else + gem install bundler +fi bundle install npm install